Whenever I write the code for HTTP request, I feel dumbed that I don’t memorize the header fields. So it would be nice to list up the fields with description in some place like blog. Some useful header fields are here. (More headers are inĀ Wikipedia)
Header Fields for HTTP Request
| Field Name | Field Description | Example |
| Accept | Content-Types that are acceptable. | text/plain |
| Accept-Charset | Character sets that are acceptable. | utf-8 |
| Accept-Encoding | Acceptable encodings. | gzip |
| Accept-Language | Acceptable languages for response. | en-US |
| Cache-Control | Used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | no-cache |
| Content-Type | The mime type of the body of the request. | application/x-www-form-urlencoded |
| User-Agent | The user agent string of the user agent. | Mozilla/5.0 (Linux; X11) |