View Full Version : JsonP and Rest proxy

7 Mar 2013, 9:51 AM
Hi all.

I already used Rest proxy for one of my projects and recently used JsonP proxy as a development usage. The goal is to be able to test the interface without having all the server on the same desktop. We switch to ajax as soon as we deliver the application.

What I want to do now is to continue to use a JsonP way to test our interface, but we now have a REST server.
So I wanted to do like i've saw in th Rest proxy and just add "actionMethods" in a class that extends the JsonP proxy.

It doesn't work. I just want to be able to use POST, PUT and DELETE in my JsonP proxy. Has someone already done that ? and how ?

Thanks in advance

7 Mar 2013, 11:50 AM
You can't, because a JsonP proxy works by inserting a script tag into the document to query the remote source. As such, these requests will always be a GET.

7 Mar 2013, 12:18 PM
Yeah, I just found out that the script tag can only have GET method.
Thanks for the answer.
So, all I can do is manage the action in another way on the server side ?