aspose file tools*
The moose likes Web Services and the fly likes curl data is not processed in POST request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "curl data is not processed in POST request" Watch "curl data is not processed in POST request" New topic
Author

curl data is not processed in POST request

Nead SanJose
Greenhorn

Joined: Apr 18, 2012
Posts: 2
The curl command:
curl -i -H "content-type: application/json" -X PUT -d '{"city"="Paris", "country"="Germany"}' http://localhost:8080/myapplication/test/hello

The method that processes the request


Output:
message: hello
city:
country:

Question:
I would like to process the data that is contained within -d option of the curl command. What attributes should I specify in the REST API?

Thank you,
Nead.
Nead SanJose
Greenhorn

Joined: Apr 18, 2012
Posts: 2
I was able to resolve this issue. The approach taken was to

1) Create an object


2) Change the REST API
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: curl data is not processed in POST request