Read http request body from REST client - rest

How can i read the body of a POST request sent via REST client (something like postman)? I think that it can be done also via wireshark, but honestly i don't know if there is some specific filter for this.
Thanks all

Related

Microsoft Forms , Flow and HTTP Post request

I am learning MS Flow with a basic setup: a Microsoft Form is submitted and its data is sent to another server with an HTTP POST request.
Weirdly the POST data seems to not being sent with the request.
From the other side, I get no data at all though when debugging in Flow it says that all the data has been sent.
This has been driving crazy for the last few days.
Please see the attached screens, if you can spot anything I m doing wrong.
Sorry for this post due to my bad understanding of REST and HTTP requests. The endpoints was expecting normal HTTP POST requests (Querystring format: var=value&var2=value...)
As you can see, Flow HTTP is indeed sending a POST request but with a JSON payload while the server was trying to decode the common querystring format.
Thanks (I am leaving this here, as it may save someone time in the future)

Is it good idea to send request.body json values with GET HTTP request?

I am working with this third party service provider where i have to fetch / filter some data from them. The search filter parameters are complex in nature and contains too many filter params. I have tried to use querystring values and with querystring, i find it more difficult to send data since the data i have to send may contain an array of objects.
With JSON request body even with HTTP GET request, I find it extremely easy to process the request and did the testing using Insomnia REST client with ease. However POSTman REST client doesn't allow to send body parameters with GET request.
I have seen others using POST request to fetch / filter data from the api for the same purpose. POST HTTP request can be used to fetch data, but is it good from the technical standpoint? Is it recommended practice to send JSON request body values with GET request?
Not sure how much control you might have on the protocol or you have any middleware, but an HTTP GET usually doesn't have a body, I've even seen smart firewalls and hosting services strip any body by default. If you want to stay "close" to clean REST, you might consider adding a "/query" to your resource path and do a POST to that endpoint; it's a bit "RPC-ish" but not too bad. Another option would be to have a completely independent query service that could be using another protocol such as JSON-RPC.

POST and PUT requests

I came across a challenge that can't seem to find a way to handle. I have a software that runs a camera system. This software is only capable of sending a POST requests. It allows me to type in the host IP, user name, password and a body of a request. I wanted to send an http request to close/open an output on one of the cameras, but from the camera manufacturer API documentation the only way to close an output via http request is to send a request with PUT method. Is there a way to change a method of a request from the body of the request, or from the host IP field? Or maybe there is a standalone software that could act as a proxy to convert that request? Finally if there's no solution out of the box does anybody know if I could set up a lightweight server with which I could accept the POST request, analyze it and send it as a PUT request?
Really appreciate your input.
Thank you.
Well if you ask, there surely is burpsuite which can be used to manipulate your http request packet. Just add the port to proxy option and turn the interceptor on so before the request reaches to api you can manipulate the http packet.
Hope this is what you were looking for.

What is http text post in webservice context?

I am having confusion around http text 'post' in terms of webservice context. We are having a web service which is built on SOAP protocol, now the integration partner wants to eliminate the SOAP portion of the XML message and wants us to post XML message as 'http text post'.
Is this REST HTTP POST? Please clarify.
POST is an HTTP request method, of which there are many (ex. GET, PUT, DELETE, HEAD...). POST is used to submit data to a server for processing, whereas GET (for example) is used to retrieve data for reading. You can read more here. These methods are used for all HTTP communication, whether the target is a SOAP/REST web service or an Apache server hosting a regular website.
SOAP normally operates using POST requests, although it is possible to use GET with SOAP 1.2 as well. GET requests have more restrictive size limitations than POST requests.

How to use Jetty's ContentExchange to send SOAP request

I am using Jetty's ContentExchange to send async http requests. I figured out how to send simple requests by just setting url. But for SOAP request, I am not sure how to set up the ContentExchange object. I searched but did not find any useful info. Please let me know if you have such experience or have some sample code to share. Thanks!