Axios makes a request, sending parameters and data


Matthew Spahr

I have a simple todo app and am using the edit tasks feature. After testing, my backend seems to be working fine. I am looking for req.body.description. I am editing tasks by ID. After saving the edits, nothing happens inside the database. My function is as follows, why is this not working?

function editTask(task) {
        const id = task.parent().parent().attr('id');
        const descript = task.parent().prev().text();
        axios.put('http://localhost:5000/api/tasks/:id', {
            params: {
                id: id
            },
            description: descript
        }).then(res => {
            console.log(res);
        }).catch(err => console.error(err));
    }
Manish Sharma
function editTask(task) {
   const id = task.parent().parent().attr('id');
   const descript = task.parent().prev().text();

   axios.put("http://localhost:5000/api/tasks/"+id, {
           description: descript
        }).then(res => {
            console.log(res);
        }).catch(err => console.error(err));
}

Related


Axios makes a request, sending parameters and data

Matthew Spahr I have a simple todo app and am using the edit tasks feature. After testing, my backend seems to be working fine. I am looking for req.body.description. I am editing tasks by ID. After saving the edits, nothing happens inside the database. My fun

Axios makes a request, sending parameters and data

Matthew Spahr I have a simple todo app and am using the edit tasks feature. After testing, my backend seems to be working fine. I am looking for req.body.description. I am editing tasks by ID. After saving the edits, nothing happens inside the database. My fun

Axios makes a request, sending parameters and data

Matthew Spahr I have a simple todo app and am using the edit tasks feature. After testing, my backend seems to be working fine. I am looking for req.body.description. I am editing tasks by ID. After saving the edits, nothing happens inside the database. My fun

POST request with axios not sending parameters

Praveesh I'm trying to post some data from Vue.js to a Symfony based backend using the following code. updateQuestion : function() { axios.post('/staff/question/api/' + this.id,{ id : 'test', name : 's

POST request with axios not sending parameters

Praveesh I'm trying to post some data from Vue.js to a Symfony based backend using the following code. updateQuestion : function() { axios.post('/staff/question/api/' + this.id,{ id : 'test', name : 's

POST request with axios not sending parameters

Praveesh I'm trying to post some data from Vue.js to a Symfony based backend using the following code. updateQuestion : function() { axios.post('/staff/question/api/' + this.id,{ id : 'test', name : 's

POST request with axios not sending parameters

Praveesh I'm trying to post some data from Vue.js to a Symfony based backend using the following code. updateQuestion : function() { axios.post('/staff/question/api/' + this.id,{ id : 'test', name : 's

Restkit request not sending parameters

Markur My implementation is not sending parameters. Here is the RequestDescriptor: RKObjectMapping *userMapping = [RKObjectMapping requestMapping]; [userMapping addAttributeMappingsFromArray:@[@"nombres", @"telefono", @"direccion", @"email", @"identificacion",

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

Axios get request parameters

benn98 Hi I'm doing an axios request to get an image, but I can't assign the response parameters to any kind of variables, but I can read them in console.log, am I wrong? let string = null; axios.get('/images/0dace5ee-1be7-4d2c-a07fb03927096815')

What happens when Axios makes a post request?

Jay Chou I'm building an app with reactjs and I'm questioning axios. I have axios.post then I call a function this.props.onChangeStep1() The way it's written... am I safe? Does this.props.onChangeStep1() always wait for res.data to fill up? onChangeHandler =

Sending data in Laravel with Axios and Vue

Redback 87 I've been following Laracasts' Stripe integration tutorial, and for me, a lot has changed since Laravel 5.4 was released. I'm still able to find my way out, but I'm having trouble trying to submit a payment form using Vue and Axios. The product is b

Sending data in Laravel with Axios and Vue

Redback 87 I've been following Laracasts' Stripe integration tutorial, and for me, a lot has changed since Laravel 5.4 was released. I'm still able to find my way out, but I'm having trouble trying to submit a payment form using Vue and Axios. The product is b

Sending data in Laravel with Axios and Vue

Redback 87 I've been following Laracasts' Stripe integration tutorial, and for me, a lot has changed since Laravel 5.4 was released. I'm still able to find my way out, but I'm having trouble trying to submit a payment form using Vue and Axios. The product is b

Sending data in Laravel with Axios and Vue

Redback 87 I've been following Laracasts' Stripe integration tutorial, and for me, a lot has changed since Laravel 5.4 was released. I'm still able to find my way out, but I'm having trouble trying to submit a payment form using Vue and Axios. The product is b

Sending data in Laravel with Axios and Vue

Redback 87 I've been following Laracasts' Stripe integration tutorial, and for me, a lot has changed since Laravel 5.4 was released. I'm still able to find my way out, but I'm having trouble trying to submit a payment form using Vue and Axios. The product is b

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Use dynamic parameters for axios request

Laflamm axios.get("/api/session/" + this.roomId) Above is a snippet from the axios call routed using my api.php ("/api/session/{id} loads the specific room requested by the controller => /api/session/3 is room 3"). Currently this snippet is encoded and always

Use dynamic parameters for axios request

Laflamm axios.get("/api/session/" + this.roomId) Above is a snippet from the axios call routed using my api.php ("/api/session/{id} loads the specific room requested by the controller => /api/session/3 is room 3"). Currently this snippet is encoded and always