Suppose any REST api is exposed over the net which has post method and has some request body. Now how would I know what are the expected request body of that REST api?
Create a sample/test API for this purpose. Server will return the sample of the object that you need to send in next API request body. So, call the this GET API to know what and all key need to be send.
Related
I'm working with an old ERP system that is capable of sending SOAP requests.
Unfortunately the endpoints I would like to send my requests to uses REST.
Is it possible to send a SOAP request to a REST endpoint?
BR Kresten
You can send whatever you want to a REST endpoint.
You could have a "gatekeeper" REST endpoint that accepted SOAP in a POST payload and converted it to whatever representation the other endpoints required and returned that representation. e.g. JSON. So in effect it becomes a SOAP to JSON converter.
If you can only send SOAP direct from an ERP system to your endpoint, your endpoint could accept the SOAP in a POST request and do whatever it wanted with it. SOAP is just XML, so the endpoint could just parse it to get the info it would "normally" get via "traditional" REST such as JSON.
You could combine the two approaches. Your ERP system could send SOAP to the "gatekeeper" endpoint which converts the SOAP to JSON and sends the converted content to the intended endpoint.
I want to pass a parameter to a method using POST request. Since all data is generated after some logic, I don't want to use form to send such request. Is is possible in playframework?
you can use play ws. It allows you to do HTTP requests
Business Catalyst has a push notification for new customer inquiries that sends a POST request with the object ID, e.g.ObjectID=1234567&ObjectType=2001
The answer to this question say to use the SOAP API(Legacy) to request the details of the case.
Is there a way to do this using the new Rest API?https://docs.worldsecuresystems.com/reference/rest-apis/index.html
There is no documented method for a cases or case endpoint.
If not, the only solution wil be to mix the API calls being used .
Some of the API's haven't been updated to v3 yet (REST) so unfortunately you will still need to use the SOAP endpoint for the Cases API.
We're using MVC request in JSP. And now we want to use those request as REST API for some other purpose. Is there any way we can call those Non REST API as REST API?
For example we make ajax post request on an spring-mvc api with some parameters, so we get result accordingly. But I want to use that API as REST like to make requests and responses like REST.
I've created a REST API using Codeigniter and I'm testing it with wiztools.org REST client https://code.google.com/p/rest-client/
How can and should I send data for a PUT request? I've seen some PHP examples where JSON is sent in the headers but I'm not sure how to do this in the client I'm testing with or how to read this data from the request.
You can use cURL to send PUT requests.