Page 1 of 1

What does REST Service only make "GET" calls? I would like to make a post call

Posted: Thu Oct 25, 2012 5:18 am
by mhunter

I have a rest service that requires POST. In the builder I specify a post, but the exported application calls GET, so it doesn't work, since the rest service is expecting a POST


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Thu Oct 25, 2012 7:57 am
by Maryna Brodina

Hello! Does the service work in desktop browser and doesn't work when you test on device?


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Thu Oct 25, 2012 1:45 pm
by Maryna Brodina

Could you share the service URL and tell us how to reproduce the problem?


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Thu Oct 25, 2012 4:08 pm
by mhunter

It works on the desktop, when you press the "test service" button, but if you launch the in browser "test" button, the service does a post. I

I have a sandbox text application
http://project.tiggzi.com/mobile-fram...

the service url is

http://69.169.142.26:8080/mmserver/j_...


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Thu Oct 25, 2012 9:44 pm
by maxkatz

Please make the URL you shared public (Test, check Public).

What do I need to invoke the service, any request parameters?


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Fri Oct 26, 2012 6:07 pm
by maxkatz

The reason it's doing a GET is because you set Data Type to 'jsonp'. JSONP can only be used with GET.


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Tue Dec 11, 2012 8:34 pm
by Jon Crump

I have the same issue, using http://confluence.jetbrains.net/displ... this seems to be a POST only API, testing with your app when configuring the service it only works with POST and jsonp, which is then changed to a GET when testing.


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Tue Dec 11, 2012 8:37 pm
by maxkatz

When using JSONP, it only works with GET (nothing to do with the builder, just how REST works). JSONP is a workaround for cross-domain calls: http://docs.tiggzi.com/documentation/...

You can try POST with the proxy on.


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Tue Dec 11, 2012 8:44 pm
by Jon Crump

POST with JSONP disables the proxy check box, but I have it checked. When I test it in Chrome I can still see the GET request. Tiggzi is wrong in allowing me to set this up or YouTracks REST API is wrong?


What does REST Service only make "GET" calls? I would like to make a post call

Posted: Tue Dec 11, 2012 8:55 pm
by maxkatz

You can use JSONP only when doing a GET.
When doing a POST, use JSON and if needed, enable the proxy.
I'm sure the API is correct.
The request works from the browser as it's not coming from the page and cross-domain service calls doesn't play a role.