'Why copying the Fetch/XHR requests from developers tools sometimes return different answer?
My question is related with the web security. Sometimes, I'm copying the requests from developers tools as curl -> So I have all the cookies (even HTTP Only ones), but even though, on one of the portal – when I execute this request, I'm getting (for example) 401 Unauthorized. How is this possible? When I'm copying same request as fetch and paste in JS console - it works normally (which is weird for me). How does it work? Their web server receive identically requests (including all the headers etc.) - the only difference is the fact that one of it I'm doing from my terminal as curl (401 Unauthorized response) and second one, I'm doing from chrome JS console (inspect tool opened on their website with active session, 200 OK). Thank You for Your help!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
