Http(Hypertext Transfer Protocol)
HTTP protocol (HyperText Transfer Protocol, Hypertext Transfer Protocol) is used to transfer files from the WWW A transfer protocol used by servers to transmit hypertext to local browsers. It can make the browser more efficient and reduce network transmission. It not only ensures that the computer transmits hypertext documents correctly and quickly, but also determines which part of the document is transmitted and which part of the content is displayed first (such as text before graphics), etc.
The information used for http protocol interaction is called a http message. The http message from the requesting end (client) is called a request message, and the
httpmessage from the responding end (server) is called a response message. The request message consists of request method
, requestURI, protocol version, header field (optional), content entity (optional) The response message consists of protocol version, status code
, reason phrase, header field (optional), and entity bodyIn each message, the request URI, protocol version, status code, reason phrase, header field belongs to the message header, then a blank line, and the rest is the message body.
There are 4 types of header fields: request header field, response header field, general header field, entity header field, general header and entity header are the request message and Both response messages have them, while request headers are only available in request messages, and response headers are only available in response messages.
Message is the basic unit in http communication, consisting of 8 bits Composed of byte stream, transmitted through http communication.
The entity is transmitted as the payload data (supplementary item) of the request and response, and its content consists of the entity header and the entity bodyGenerally, the message body is equal to the entity body . Only when the encoding operation is performed during transmission and the content of the entity body changes, will it be inconsistent with the message body.http1.0 and http1.1Supported methods
Method |
Description |
Support httpProtocol version |
##GET | Get the resource identified by URI |
1.0,1.1 |
##POST |
##Transmission Entity Body
|
1.0,1.1
|
| Transfer files( Without verification mechanism) | 1.0,1.1|
Get the message header |
1.0,1.1 |
|
file | (without verification Mechanism)##1.0,1.1 |
|
OPTIONS |
##Ask for support methods |
1.1 |
TRACE |
Trace path |
##1.1
|
##1.1 |
|
|
Establish connections with resources |
1.0 |
|
Disconnect link relationship |
##1.0 |
##http
Status code##Status code
Category |
Reason Phrase |
1XX |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Informational (Informational status code) | ##2XX |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Success (success status code) |
The request has been processed normally. |
##3XX |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(Redirect status code) |
4XX
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The server cannot process the request
| ##5XX|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Commonly used status codes in
14
|
The above is the detailed content of HTTP methods, status codes and components. For more information, please follow other related articles on the PHP Chinese website!

HTTP525状态码简介:了解其定义和使用方法HTTP(HypertextTransferProtocol)525状态码是指服务器在SSL握手过程中发生错误,导致无法建立安全连接。在传输层安全性(TLS)握手期间发生错误时,服务器将返回此状态码。该状态码属于服务器错误类别,通常表示服务器配置或设置问题。当客户端尝试通过HTTPS连接到服务器时,服务器无

掌握HTTP301状态码的含义:网页重定向的常见应用场景随着互联网的迅猛发展,人们对网页交互的要求也越来越高。在网页设计领域,网页重定向是一种常见且重要的技术,通过HTTP301状态码来实现。本文将探讨HTTP301状态码的含义以及在网页重定向中的常见应用场景。HTTP301状态码是指永久重定向(PermanentRedirect)。当服务器接收到客户端发

HTTP状态码200:探索成功响应的含义与用途HTTP状态码是用来表示服务器响应状态的数字代码。其中,状态码200表示请求已成功被服务器处理。本文将探索HTTP状态码200的具体含义与用途。首先,让我们了解一下HTTP状态码的分类。状态码被分为五个类别,分别是1xx、2xx、3xx、4xx和5xx。其中,2xx表示成功的响应。而200是2xx中最常见的状态码

HTTP请求超时,服务器端常常会返回504GatewayTimeout状态码。该状态码表示服务器在执行某个请求时,经过一段时间后仍未能获取到请求所需的资源或完成请求的处理。它是5xx系列的状态码,表示服务器端遇到了临时的问题或过载,导致无法正确处理客户端的请求。在HTTP协议中,各种状态码都有特定的含义和用途,而504状态码则用于表示请求超时问题。在客户

解读HTTP状态码301:如何正确处理永久重定向错误HTTP状态码是Web应用中非常重要的一部分,它们向客户端提供了关于请求的处理状态的信息。301状态码是一个特殊的状态码,它表示所请求的资源已被永久性转移到新的位置。在本文中,我们将解读301状态码,并探讨如何正确处理永久重定向错误。一、理解301状态码当服务器接收到客户端发出的请求时,如果所请求的资源已被

获得http状态码的方法使用浏览器和使用编程语言等。详细介绍:1、使用浏览器,当在浏览器中访问一个网页时,浏览器会向服务器发送HTTP请求,并在接收到服务器的响应后显示网页内容,浏览器通常会在页面的开发者工具中显示HTTP状态码;2、使用编程语言,如果想通过编程的方式获取HTTP状态码,可以使用各种编程语言提供的库和函数。

HTTP状态码500:分析服务器内部错误及其修复方案摘要:HTTP状态码500表示服务器内部错误,是客户端向服务器发送请求时,服务器遇到了无法处理的错误而无法完成请求。本文将分析导致服务器内部错误的可能原因,并提出相应的修复方案。一、引言HTTP(HypertextTransferProtocol)是一种用于传输超文本的应用层协议,它是客户端和服务器之间

探究HTTP状态码404的原因和解决途径引言:在浏览网页的过程中,我们经常会遇到HTTP状态码404。这个状态码表示服务器未能找到请求的资源。在本文中,我们将探究HTTP状态码404的原因,并分享一些解决途径。一、HTTP状态码404的原因:1.1资源不存在:最常见的原因就是请求的资源在服务器上不存在。这可能是由于文件被误删、命名错误、路径错误等原因导致。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools
