Reply
Visitor
freddy
Posts: 1
0

REST API - Salesforce returns 405 METHOD_NOT_ALLOWED despite creating object

Hi all, 

 

I posted this over on stackoverflow as well - http://stackoverflow.com/questions/12787366/salesforce-creates-record-but-responds-with-a-405

 

I have a Wordpress plug-in that is using wp_remote_post to create standard Objects in Salesforce via the REST API using POST. 

 

It's successively creating the objects based on the data I'm passing over but the response from Salesforce comes to me as a 405 METHOD_NOT_ALLOWED. Instead of a 201 Created (which has the Id of the object I just created).

 

If I try the same body content via the Salesforce Developer Workbench the response is 201 Created but when sent via my local server up to Salesforce, the response is a 405. 

 

Is this a configuration with Salesforce?

Is there something I should look for locally? (running an nginx web server locally using php-fpm)

 

I do not get a similar response when I use GET. It comes back with a 200 status code and the results of the SOQL query.