Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to pass HTTP headers in the URL itself?

For example: if i wanted to pass Content-Type as application/json in the url itself, how would I do that?

I do know about Postman, but have not used it much. I was wondering if I could just do what I need from chrome itself, without needing to use POSTMAN.

like image 826
user2407334 Avatar asked Apr 21 '16 15:04

user2407334


People also ask

How do I pass HTTP request headers?

In the Name field, enter the name of your header rule (for example, My header ). From the Type menu, select Request, and from the Action menu, select Set. In the Destination field, enter the name of the header affected by the selected action. In the Source field, enter where the content for the header comes from.

Can HTTP headers be spoofed?

It is trivial to spoof HTTP requests and the Host header is no exception. This is usually of little concern: depending on the way the web server is set up, the user will get a redirect, an error, or a default website.

Can HTTP headers be sniffed?

The entire HTTP request (and response) is encrypted, including the URL. But yes, there is a way an attacker could grab the full URL: through the Referer header. If there is any external file (Javscript, CSS, etc.) which is not over HTTPS, the full URL could be sniffed in the Referer header.


1 Answers

No, you can't. HTTP standard has no way to do that.

But you can run JS with ajax request with you headers from address bar via bookmarklets mechanism.

https://en.wikipedia.org/wiki/Bookmarklet

Possible to run Javascript from address bar (bookmarklet) within Google Chrome's settings panel?

like image 176
rootatdarkstar Avatar answered Oct 12 '22 04:10

rootatdarkstar