I am having Request failed with status code 405 error when submitting the post request from React Native and using Laravel 7 in the backend.
const data = {
...
}
const headers = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Method": "POST",
"Content-Type": "application/json",
}
axios.post(API_URL, data, headers).then((response) => {
consoleLog("token", response.data)
if (response.data) {
this.setState({
bkashURL: API_URL + response.data,
loading: false,
})
}
})
Laravel Route:
Route::post('/', 'PaymentController@processInput');
Please help.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3hEapxz
via IFTTT
Aucun commentaire:
Enregistrer un commentaire