Support Topics Documentation Slack YouTube Blog

REST Request Fails with HTTP 400 Error

(Kam Rezvani) #1

The client is Appcelerator Titanium app. I have created a sample project that recreates the problem.

(Vladimir Upirov) #2

Please be more specific, could you please provide a curl of request which is not working?
Regards, Vlad

(Kam Rezvani) #3

Yes. The CURL request works through the browser and not from within the App. It is a GET request. So sharing the request with you is not useful.

(Mark Piller) #4

Please share the project you created with us. You can upload it to Dropbox or Google drive and send a link to with a link to this topic.


(Vladimir Upirov) #5

What’s error message of the HTTP 400 error?, can you see it somewhere in logs?

and could you please try to modify your BackendlessAccess class:

   httpClient.send(); // remove options.payload from arguments

I assume it can lead to transformation the request from GET to POST, that’s why you get 400 Bad Request

(Vladimir Upirov) #6

yeah, after removing options.payload I can see this screen

(Kam Rezvani) #7

Thank you Valdimir. The fix resolved the issue.