PUT request doesn't update deal_stage_id

I have created a new webhook and custom logic in order to match accounts in different systems. After these checks, the corresponding deal should get a new deal_stage_id, since the funnel will be completed when the logic returns true.

When an API-call is posted with CURL, in the terminal, everything works fine. However, Implemented in the server.js file, it will return a GET-response in stead of updating the record.

The code is as follows:

var body = JSON.stringify({"deal":{"deal_stage_id":30000050925}})
$request.put("https://gorillaservices6.myfreshworks.com/crm/sales/api/deals/"+deals, options, body)
                  .then(function(data) {
                    console.log(data);
                  },
                  function(error) {
                    console.log(error);
                        //handle failure
                      }
                      );
                ```

The header is defined above and holds the auth-token and content:application/json. These parameters work on the GET-requests

Let’s try this

How about we try the same put requests using axios or superagent just to confirm we maybe having problems with constructing API requests or something else…