As a web development it is necessary to familiarize yourself with the request headers and the response headers of common HTTP. For example, the request header Content-type specified the content of the request, if the type is application/x-www-form-urlencoded, you can call Reqeust get the parameter method to fetch the content, if the other needs to call the method
) content-length:80 ( The server sends the displayed bytecode length) NBSP;CONTENT-LANGUAGE:ZH-CN (the language and country name of the server sending the content) Content-Type:image/jpeg; Charset=utf-8 (Type and encoding type of content sent by the server) last-modified:tue, 18:23:51 GMT (the last time the server was modified) NBSP;REFResh:1;url=http://www.it315.org (Control browser 1 seconds after the forwarding URL points to the page) Content-Dispo
HTTP request Header Overview (HttpServletRequest) An HTTP client (for example, a browser) that must indicate the type of request (typically get or post) when sending a request to the server. If necessary, the client can also choose to send another request header. Most request headers are not required, except for content-length. Content-length must appear for post
customer needs to fill out a form. The most commonly used request headers associated with request data are Content-type and content-length.Instance1). GET
Request First Lineget/hello/index.jsp http/1.1Request header information because the GET request has no bodyHost:localhostuser-agent:mozilla/5.0 (Windows NT 5.1; rv:5.0) gecko/20100101 firefox/5.0accept:text/html,application/xhtml+xml,app
This article briefly summarizes the HTTP request headers and response headers, and uses the response headers in some web development cases.1. HTTP request HeaderAccept: The browser uses this header to tell the server what type of data it supports. such as: text/html, Image/j
For a more detailed understanding of HTTP request headers and response headers, see the requests section below
Header
explain
Example
Accept
Specify what types of content clients can receive
Accept:text/plain, text/html
Accept-charset
The set of character encodings that the browser can accept.
(buffer,0, Len); } }@Override protected void DoPost(HttpServletRequest req, HttpServletResponse resp)throwsServletexception, IOException {doget (req, resp); }}Operation Result:This section introduces the request header and the response header in HTTP, as well as some examples of responses to the header browser, I believe that through this chapter, we have a better understanding of the HTTP protocol,
Web Cache basics: Terms, HTTP headers and cache policies, web HeadersIntroduction
For visitors to your site, intelligent content caching is one of the most effective ways to improve user experience. Caching, or temporary storage of previous requests, is one of the core content delivery policies in HTTP. All components in the distribution path can cache content to
The Cache-Control of the Http request header and response header is wordpress, and the Cache-Control in the request header is no-cache, in the response header, I set max-age = 259200 in nginx, so the browser does not cache it...
Request Headersview sourceAccept:*/*Accept-Encoding:gzip, deflate, sdchAccept-Language:zh-CN,zh;q=0.8Cache-Control:no-cacheConnection:keep-aliveCookie:CNZZDATA1254790698=1245005062-1429681029-%7C1429681029Host:yuanzi.mePra
200, 302, 304, 404, and 500.
5. list three header fields that disable browser cache and write the corresponding settings.
Answer:
1. http1.0 can send only one request and response at a time for each connection to establish a connection, and the request will be closed. http1.0 does not have the Host field;Http1.1 can send multiple requests and responses in the same connection, and multiple requests can overlap and simultaneously. http1.1 must have the Host field.
2. Request Message structure: a
setting values.
Answer:
1.http1.0 for each connection to establish a connection at a time can only send a request and response, the request will be closed, HTTP1.0 no host field;HTTP1.1 can transmit multiple requests and responses in the same connection, multiple requests can overlap and simultaneously, HTTP1.1 must have a host field.
2. Request message structure: A request line, a number of message headers, and the contents of the corpse, some of t
Tags: nbsp cat angularjs pos Configuration js post data not ICAPhenomenon:1. Angular HTTP does not configure data (request parameters) without error2. After adding the request parameter, the error3. Server Response.headers (). Set (HttpHeaders.Names.ACCESS_CONTROL_ALLOW_HEADERS, HttpHeaders.Names.CONTENT_TYPE);by check:1. Angularjs Default Application/json2. No p
Technical information about http headers in http
I. BasicsHyperTextTransferProtocol is short for Hypertext Transfer Protocol. It is used to transmit WWW Data. For details about HTTP, see rfc2616. The HTTP protocol uses the request/response model. The client sends a request t
$ Http is a core service in AngularJS. It is used to read data from remote servers. This article describes $ http cache and how to process multiple $ http requests in AngularJS, hope you can learn it together. $ http is a core ser
Introduction to $ http service usage in AngularJS, Introduction to angularjs
We can use the built-in $ http service to directly communicate with the outside. $ Http service simply encapsulates the native XMLHttpRequest object of the browser.
1. chained call
$
Gets the header information for the HTTP request.
The PHP manual provides a ready-made function:
Getallheaders
(PHP 4, PHP 5)
Getallheaders-fetch all HTTP Request headers
Description
Arraygetallheaders (void)
Fetches all HTTP headers from the current request.
This function i
blob=new Blob(['Hello world'],{type:'text/plain'});$http({method:'POST',url:'/',data:blob});
4. Response object
The response object passed by AngularJS to the then () method contains four attributes.
Data
This data represents the converted response body (if the conversion is defined)
Status
HTTP status code of the response
PHP modifies HTTP header--modify http Headers
Modify HTTP Headers
See RELATED links for more status codes//Use this header instruction to fix 404 headers//produced by URL rewriting: . Header ('
(link)Description: Insert Web page Base Link propertyUsage: Note: all relative paths on your page will be prefixed with "http://www.***.com/" when Linking. Where Target=_blank is the link file opens in a new window, you can do other settings. Change "_blank" to "_parent" is the link file will open in the parent window of the current window, instead the "_self" link file opens in the current window (frame), instead the "_top" link file is displayed in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.