Jump to content

Understanding post request headers


NotionCommotion

Recommended Posts

I have the request headers for three posts.  Can someone help me interpret them?  Some like the Host, Referer, Unser-Agent, and Cookie are rather obvious, but not positive about the rest. Thanks

 

Traditional form with post method

Accept    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding    gzip, deflate
Accept-Language    en-US,en;q=0.5
Authorization    Basic TWljaGFlbDpTdW5zaGluZQ==
Connection    keep-alive
Host    www.example.com
Referer    https://www.example.com/lib/testing/post.php
User-Agent    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0

jQuery Ajax with post method

Accept    */*
Accept-Encoding    gzip, deflate
Accept-Language    en-US,en;q=0.5
Content-Length    192
Content-Type    application/x-www-form-urlencoded; charset=UTF-8
Cookie    BACKSESSID=ldeklk651f1fia0olqaubfqrb6
Host    test.sites.example.com
Referer    https://test.sites.example.com/administrator/index.php?cid=2&controller=detail&id=1125382824
User-Agent    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
X-Requested-With    XMLHttpRequest

xhr request using fineuploaded plugin

Accept    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding    gzip, deflate
Accept-Language    en-US,en;q=0.5
Cache-Control    no-cache
Content-Length    11480
Content-Type    application/octet-stream
Cookie    BACKSESSID=ldeklk651f1fia0olqaubfqrb6
Host    test.sites.example.com
Referer    https://test.sites.example.com/administrator/index.php?cid=2&controller=detail&id=1125382824
User-Agent    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
X-File-Name    Circuit%20Breaker.xlsx
X-Mime-Type    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
X-Requested-With    XMLHttpRequest
Link to comment
https://forums.phpfreaks.com/topic/294727-understanding-post-request-headers/
Share on other sites

Not to brush you off with a dismissive "RTFM!" but

 

Header Field Definitions

 

X-File-Name and X-Mime-Type are custom fields that the uploading code presumably understands and knows to look for.

X-Requested-With is basically always "XMLHttpRequest", for AJAX.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.