question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Default user-agent, Inconsistancy between request & "Copy as Curl"

See original GitHub issue
  • Insomnia Version: 6.3.1

Details

With the most simple query (GET with just an url), why a default user-agent is setted ? https://webhook.site/#/1531597c-5ce7-4fd6-a6eb-f202978fc22f/1a4ef060-403e-414f-98be-cf0a9775849d/1

If we use the functionnality “Copy as Curl”, the default user-agent is not setted.

curl --request GET \
  --url https://webhook.site/1531597c-5ce7-4fd6-a6eb-f202978fc22f

This could result in a different reply between insomia and curl.

I would prefer to not have user-agent per default but if it’s “mandatory”, this user-agent should be exported on curl request.

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PierrickPcommented, Jan 20, 2019

ok i agree it’s often necessary. To be consistency, in curl export, the default user-agent should be set

1reaction
gschiercommented, Jan 18, 2019

Yep, the default headers should be updated to match the ones for regular requests 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request going through in firefox but failing with `copy as cURL`
I get exactly same issue: curl sends back AccessDeniedPage; modify and send from Firefox sends 200 status code. CURL.
Read more >
Curl - Request with wp_remote_get() responds 500, curl_exec ...
Basically, a curl request to a remote API returns a status code 500 response, ONLY in wp_remote_get() , where it returns status 200...
Read more >
User-Agent - HTTP - MDN Web Docs - Mozilla
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, ...
Read more >
curl.1 the man page
curl is a tool for transferring data from or to a server. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP,...
Read more >
How to download videos from Coursera with curl?
Maybe you have to specify the user-agent of your request via the --user-agent <agent string> switch. A common <agent string> is Mozilla/5.0 ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found