curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Capture the cURL (https://curl.se/) request (header and body) initiated by Postman REST API client

From: Kaushal Shriyan via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 29 Sep 2024 23:53:54 +0530

On Wed, Sep 25, 2024 at 3:15 AM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Tue, 24 Sep 2024, Kaushal Shriyan via curl-users wrote:
>
> > I am using a postman to invoke a REST API call. Is there a way to
> capture
> > the cURL (https://curl.se/) request (header and body) initiated by
> Postman
> > REST API client to the Application server which is running RHEL 8.10 OS
> to
> > the backend server/system?
>
> I don't think postman uses curl natively. But I think I have seen people
> mention as "copy as curl" option?
>
> If not, I propose you just tell it to send its request to a http server +
> port
> where you run nc -l which when will display the full request.
>
> Then you can copy that full request into "h2c" that converts it to a curl
> command line for you: https://curl.se/h2c/
>
> --


Thanks Daniel for the response. So what I understand is to run the command
based on the below flow

Postman -> Application server -> Proxy server -> Backend server.

On Application server (RHEL 8.10) run

#nc -l 443

curl -v https://Application serverIP from postman?

Please correct me if I am understanding it correctly?

Best Regards,

Kaushal


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-09-29