Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified
Accepted Solution

XMLHttpRequest PUT Verb not supported?!?!

Hi,

 

I'm trying to consume a Restful web service that has a method which uses the PUT verb. I'm a creating a XMLHttpRequest in my webworks application but this PUT is being changed to a POST so as a result i get "Method Not Allowed" back fromt he server all the time.

 

Looking at the server logs i can see that if I call the service from a page in Google Chrome i get:

2011-04-12 09:22:58 127.0.0.1 PUT /RESTTest/Appointment/Outcome - 80 - 127.0.0.1 Mozilla....

If use the blackberry browser on the phone it works ok

2011-04-12 09:24:57 127.0.0.1 PUT /RESTTest/Appointment/Outcome - 80 - 127.0.0.1 BlackBerry9550....

However the request being sent via the webworks app fails as the verb is being changed from PUT to Post

2011-04-12 09:25:24 127.0.0.1 POST /RESTTest/Appointment/Outcome - 80 - 127.0.0.1 BlackBerry9550

The service cannot be changed as it needs to comply to restful service standards, does anyone have a work around to get around this behaviour in webworks apps?

 

Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: XMLHttpRequest PUT Verb not supported?!?!

I've just tested this on OS6 and OS6 widget apps do send XMLHttpRequests as a PUT when specified so it's just OS5 that sends them as POST when they are specified as PUT.

 

 

Highlighted
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: XMLHttpRequest PUT Verb not supported?!?!

Updating the OS5 simultor to version Storm 2 5.0.0.517 and the real device has resolved this in case anyone else has the same issue