I’m trying to add a Contact to salesforce database by calling a REST resource when a Custom Form is submitted and sending a POST HTTP Request to:
https://eu9.lightning.force.com/services/data/v41.0/sobjects/Contact
With the request body containing the JSON array:
{“FirstName”:“Matrix”,“LastName”:“Test”}
If successful, I’d expect the following type of response:
{ “id” : “0030O000023k1LkQAI”, “success” : true, “errors” : [ ], “warnings” : [ ] }
However, the HTTP response I get from salesforce (which is stored in a session variable) is what I would expect to get from a GET request (listing all the recent contacts).
Here’s a screenshot of REST call:
Here a screenshot of the Run Test:
(token blacked out)
Matrix is telling me that it was a POST request, both when I run a test and when I print out the response but Salesforce is returning a response as if it was a GET call. The status code in the response is 200 (OK) instead of 201 (Created) as well.
Are there Matrix logs I can check or do I need access to web server logs?
I’m on Matrix v5.4.0.1
Thanks,
Robin