PDA

View Full Version : ExtJs : Rest Proxy & PUT request



NicoRoby
12 Dec 2013, 12:45 AM
Hi,

I'm a newbie with extjs and I need some help.

I try to implement this exemple :

- http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/restful/restful.html

Javascript is exactly the same except cors=true for proxy.
I use java tomcat resteasy solution for server side.

I send response to the PUT request for updating data like this :

Request URL:
http://localhost:8080/restapp/json-test/users/1?_dc=1386835144171

Request Method:
PUT

Status Code:

200 OK

Request Headers (11)
Query String Parameters (1)
Request Payload
{id:1, email:totr 1dfghj, first:tototot 1, last:dfdsdf 1}



Response Headersview source

Access-Control-Allow-Methods:
DELETE, HEAD, GET, OPTIONS, POST, PUT
Access-Control-Allow-Origin:
http://localhost:63342
Access-Control-Max-Age:
3600
Content-Type:
application/json
Date:
Thu, 12 Dec 2013 07:59:04 GMT
Server:
Apache-Coyote/1.1


data: {id:1, email:totr 1dfghj, first:tototot 1, last:dfdsdf 1}
message: "ok"
success: true
Transfer-Encoding:
chunked

Impossible to have a success response from the listener whereas the response content is exactly the same like rest exemple.
I'm literally lost ;(

skirtle
13 Dec 2013, 2:08 AM
Is it just PUT requests that aren't working? What about GET, POST or DELETE?


Impossible to have a success response from the listener

Could you elaborate on this? What exactly are you seeing? Is the write listener being called at all?