2

I'm integrating DrupalGap with Drupal 7 and Services module. Issue I'm running into is that all PUT requests are returned as 405 Method Not Allowed.

For example: GET http://example.com/?q=drupalgap/user/1.json works just fine. After I update the json and try PUT http://example.com/?q=drupalgap/user/1.json gives me the 405.

This is happening locally and on the hosted server, hosting is with Pantheon, they use nginx if that's relevant.

I also tried doing the PUT using the Poster browser extension, same result, which makes me think it's a config setting that's incorrect.

1

There is no configuration needed in drupal to accept put requests the web server may be refusing PUT requests and requires some configuration see why-does-my-web-server-software-disallow-put-and-delete-requests for more information about this issue.

Try curl and see response example below

curl -X PUT the request

The advanced rest client s chrome extension I prefer to use over others.

  • 1
    Thanks for the answer. I have permissions added to my .htaccess file, and the curl is till giving me a 405 error. Going to have to keep looking at the Services module and DrupalGap I guess. I checked out that extension you recommended, so far the best REST extension I've seen, so thanks for that. – Matt Mar 28 '16 at 14:42
  • Upvote the left up button – Mohammed Gomma Mar 28 '16 at 17:49
  • 1
    I need more internet points before it lets me vote :( – Matt Mar 29 '16 at 14:32
1

Turns out that the issue was with Pantheon hosting, something they have configured doesn't allow DrupalGap to PUT or PUSH to Drupal Services, I went through their support and they showed they can GET, PUT, PUSH to Drupal services, but they don't provide support for 3rd party modules if they don't work as expected. Switched over to Acquia managed hosting and all services work as expected now, also worked fine on a basic shared hosting server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.