cli icon indicating copy to clipboard operation
cli copied to clipboard

Pasting some curl requests in the URL field mostly fails

Open SabbirAC opened this issue 1 year ago • 0 comments

I think half of the cURL examples out there whether from API documentation or whatever curl requests ChatGPT spits out have a backslash at the end of the endpoint URL

Example curl -X POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token \ -d "client_id={client_id}" \ -d "scope=https://ads.microsoft.com/.default" \ -d "client_secret={client_secret}" \ -d "grant_type=client_credentials"

Whenever I copy this curl request and paste it in the URL bar in HTTPie, it will not detect the URL, but happily detects the rest of the parameters. Good thing is when I paste the cURL in the HTTPie URL field, it gives me an edit button where I can/have to remove the backslash () from the curl request and it will import nicely.

HTTPie_R8AY9T85qk

SabbirAC avatar Jul 11 '24 13:07 SabbirAC