Discussion
1
Replies
3190
Views
Posted: April 25, 2016
Last activity: April 7, 2017
Closed
Connect-Rest Post method call
I am calling Restful web service which is provided by Solr Search.
Web service is supporting "application/x-www-form-urlencoded" request Content-Type and dose not supporting to "application/json"
As I am doing post method call I want to post request data in to message body (Post_Body).
In which format should I pass and how ?
Thank you
***Updated by moderator: Lochan to add Categories***
According to: https://en.wikipedia.org/wiki/Percent-encoding#The_application.2Fx-www-form-urlencoded_type
.. your target server only accepts old-fashioned name-value-pair form data, not JSON.
Essentially create a query string separating name=value pairs using '&" then url-encode the entire string?
See https://deltacloud.apache.org/curl-examples.html
Launch an instance. Note that in this example parameters are specified as application/x-www-form-urlencoded through the use of the -d flag: