Package org.miaixz.bus.core.net
Class HTTP
java.lang.Object
org.miaixz.bus.core.net.HTTP
HTTP 相关常量
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe header Acceptstatic final StringThe header Accept-Charsetstatic final StringThe header Accept-Encodingstatic final StringThe header Accept-Languagestatic final StringThe header Accept-Rangesstatic final StringThe header Sec-WebSocket-Versionstatic final StringHTTP Method AFTERstatic final StringThe header Agestatic final StringHTTP Method ALLstatic final StringThe header Allowstatic final StringThe header Authorizationstatic final StringHTTP Method BEFOREstatic final StringThe header Cache-Controlstatic final StringHTTP Method CONNECTstatic final StringThe header Connectionstatic final StringThe header Content-Dispositionstatic final StringThe header Content-Encodingstatic final StringThe header Content-Languagestatic final StringThe header Content-Lengthstatic final StringThe header Content-Locationstatic final StringThe header Content-MD5static final StringThe header Content-Rangestatic final StringThe header Content-Typestatic final StringThe header Cookiestatic final StringThe header Datestatic final intFrom the HTTP/2 specs, the default initial window size for all streams is 64 KiB.static final StringHTTP Method DELETEstatic final intHTTP/2: The peer must not send a PUSH_PROMISE frame when this is 0.static final StringThe header Encodingstatic final StringThe header Etagstatic final StringThe header Expectstatic final StringThe header Expiresstatic final StringThe use form datastatic final StringThe header Fromstatic final StringHTTP Method GETstatic final StringHTTP Method HEADstatic final intHTTP/2: Size in bytes of the table used to decode the sender's header blocks.static final StringThe header Hoststatic final intHTTP Status-Code 202: Accepted.static final intHTTP Status-Code 502: Bad Gateway.static final intHTTP Status-Code 405: Method Not Allowed.static final intHTTP Status-Code 400: Bad Request.static final intHTTP Status-Code 408: Request Time-Out.static final intHTTP Status-Code 409: Conflict.static final intHTTP Status-Code 100: Continue.static final intHTTP Status-Code 201: Created.static final intHTTP Status-Code 413: Request Entity Too Large.static final intHTTP Status-Code 403: Forbidden.static final intHTTP Status-Code 504: Gateway Timeout.static final intHTTP Status-Code 410: Gone.static final intHTTP Status-Code 500: Internal Server Error.static final intHTTP Status-Code 411: Length Required.static final intHTTP Status-Code 301: Moved Permanently.static final intHTTP Status-Code 302: Temporary Redirect.static final intHTTP Status-Code 300: Multiple Choices.static final intHTTP Status-Code 204: No Content.static final intHTTP Status-Code 406: Not Acceptable.static final intHTTP Status-Code 203: Non-Authoritative Information.static final intHTTP Status-Code 404: Not Found.static final intHTTP Status-Code 501: Not Implemented.static final intHTTP Status-Code 304: Not Modified.static final intHTTP Status-Code 200: OK.static final intHTTP Status-Code 206: Partial Content.static final intHTTP Status-Code 402: Payment Required.static final intHTTP Status-Code 308: Use perm Redirect.static final intHTTP Status-Code 412: Precondition Failed.static final intHTTP Status-Code 407: Proxy Authentication Required.static final intHTTP Status-Code 414: Request-URI Too Large.static final intHTTP Status-Code 205: Reset Content.static final intHTTP Status-Code 303: See Other.static final intHTTP Status-Code 101: Switching Protocols.static final intHTTP Status-Code 307: Temporary Redirect.static final intHTTP Status-Code 401: Unauthorized.static final intHTTP Status-Code 503: Service Unavailable.static final intHTTP Status-Code 415: Unsupported Media Type.static final intHTTP Status-Code 305: Use Proxy.static final intHTTP Status-Code 505: HTTP Version Not Supported.static final StringThe header Httpd-Preemptivestatic final StringThe header If-Matchstatic final StringThe header If-Modified-Sincestatic final StringThe header If-None-Matchstatic final StringThe header If-Rangestatic final StringThe header If-Unmodified-Sincestatic final intWindow size in bytes.static final StringThe use json datastatic final StringThe header Keep-Alivestatic final StringThe header Last-Modifiedstatic final StringThe header Linkstatic final StringThe header Locationstatic final intSender's maximum number of concurrent streams.static final StringThe header Max-Forwardsstatic final intHTTP/2: Size in bytes of the largest frame payload the sender will accept.static final intHTTP/2: Advisory only.static final StringHTTP Method MOVEstatic final StringHTTP Method NONEstatic final StringHTTP Method OPTIONSstatic final StringHTTP Method PATCHstatic final StringHTTP Method POSTstatic final StringHTTP Method PROPFINDstatic final StringHTTP Method PROPPATCHstatic final StringThe use protobuf datastatic final StringThe header Proxy-Authenticatestatic final StringThe header Proxy-Authorizationstatic final StringThe header Proxy-Connectionstatic final StringHTTP Method PUTstatic final StringThe header Rangestatic final StringThe header Refererstatic final StringThe header Refreshstatic final StringHTTP Method REPORTstatic final StringThe use statusstatic final StringThe header Retry-Afterstatic final StringThe header Sec-WebSocket-Acceptstatic final StringThe header Sec-WebSocket-Keystatic final StringThe header Sec-WebSocket-Versionstatic final StringThe header Serverstatic final StringThe header Set-Cookiestatic final StringThe header SOAPActionstatic final StringThe header Sec-WebSocket-Versionstatic final StringThe use authoritystatic final StringThe use methodstatic final StringThe use pathstatic final StringThe use schemestatic final StringThe header testatic final StringHTTP Method TRACEstatic final StringThe header Trailersstatic final StringThe header Transfer-Encodingstatic final StringThe header Upgradestatic final StringThe header User-Agentstatic final StringThe header Varystatic final StringThe header Viastatic final StringThe header WWW-Authenticatestatic final StringThe use xml data -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleaninvalidatesCache(String method) WebDAVstatic booleanpermitsRequestBody(String method) 许可维护请求体static booleanredirectsToGet(String method) 除了PROPFIND之外的所有请求都应该重定向到GET请求static booleanredirectsWithBody(String method) (WebDAV)重定向也应该维护请求体static booleanrequiresRequestBody(String method) WebDAV CalDAV/CardDAV(在WebDAV版本中定义)
-
Field Details
-
ALL
HTTP Method ALL- See Also:
-
NONE
HTTP Method NONE- See Also:
-
GET
HTTP Method GET- See Also:
-
POST
HTTP Method POST- See Also:
-
PUT
HTTP Method PUT- See Also:
-
PATCH
HTTP Method PATCH- See Also:
-
DELETE
HTTP Method DELETE- See Also:
-
HEAD
HTTP Method HEAD- See Also:
-
TRACE
HTTP Method TRACE- See Also:
-
CONNECT
HTTP Method CONNECT- See Also:
-
OPTIONS
HTTP Method OPTIONS- See Also:
-
BEFORE
HTTP Method BEFORE- See Also:
-
AFTER
HTTP Method AFTER- See Also:
-
MOVE
HTTP Method MOVE- See Also:
-
PROPPATCH
HTTP Method PROPPATCH- See Also:
-
REPORT
HTTP Method REPORT- See Also:
-
PROPFIND
HTTP Method PROPFIND- See Also:
-
HTTP_CONTINUE
public static final int HTTP_CONTINUEHTTP Status-Code 100: Continue.- See Also:
-
HTTP_SWITCHING_PROTOCOL
public static final int HTTP_SWITCHING_PROTOCOLHTTP Status-Code 101: Switching Protocols.- See Also:
-
HTTP_OK
public static final int HTTP_OKHTTP Status-Code 200: OK.- See Also:
-
HTTP_CREATED
public static final int HTTP_CREATEDHTTP Status-Code 201: Created.- See Also:
-
HTTP_ACCEPTED
public static final int HTTP_ACCEPTEDHTTP Status-Code 202: Accepted.- See Also:
-
HTTP_NOT_AUTHORITATIVE
public static final int HTTP_NOT_AUTHORITATIVEHTTP Status-Code 203: Non-Authoritative Information.- See Also:
-
HTTP_NO_CONTENT
public static final int HTTP_NO_CONTENTHTTP Status-Code 204: No Content.- See Also:
-
HTTP_RESET
public static final int HTTP_RESETHTTP Status-Code 205: Reset Content.- See Also:
-
HTTP_PARTIAL
public static final int HTTP_PARTIALHTTP Status-Code 206: Partial Content.- See Also:
-
HTTP_MULT_CHOICE
public static final int HTTP_MULT_CHOICEHTTP Status-Code 300: Multiple Choices.- See Also:
-
HTTP_MOVED_PERM
public static final int HTTP_MOVED_PERMHTTP Status-Code 301: Moved Permanently.- See Also:
-
HTTP_MOVED_TEMP
public static final int HTTP_MOVED_TEMPHTTP Status-Code 302: Temporary Redirect.- See Also:
-
HTTP_SEE_OTHER
public static final int HTTP_SEE_OTHERHTTP Status-Code 303: See Other.- See Also:
-
HTTP_NOT_MODIFIED
public static final int HTTP_NOT_MODIFIEDHTTP Status-Code 304: Not Modified.- See Also:
-
HTTP_USE_PROXY
public static final int HTTP_USE_PROXYHTTP Status-Code 305: Use Proxy.- See Also:
-
HTTP_TEMP_REDIRECT
public static final int HTTP_TEMP_REDIRECTHTTP Status-Code 307: Temporary Redirect.- See Also:
-
HTTP_PERM_REDIRECT
public static final int HTTP_PERM_REDIRECTHTTP Status-Code 308: Use perm Redirect.- See Also:
-
HTTP_BAD_REQUEST
public static final int HTTP_BAD_REQUESTHTTP Status-Code 400: Bad Request.- See Also:
-
HTTP_UNAUTHORIZED
public static final int HTTP_UNAUTHORIZEDHTTP Status-Code 401: Unauthorized.- See Also:
-
HTTP_PAYMENT_REQUIRED
public static final int HTTP_PAYMENT_REQUIREDHTTP Status-Code 402: Payment Required.- See Also:
-
HTTP_FORBIDDEN
public static final int HTTP_FORBIDDENHTTP Status-Code 403: Forbidden.- See Also:
-
HTTP_NOT_FOUND
public static final int HTTP_NOT_FOUNDHTTP Status-Code 404: Not Found.- See Also:
-
HTTP_BAD_METHOD
public static final int HTTP_BAD_METHODHTTP Status-Code 405: Method Not Allowed.- See Also:
-
HTTP_NOT_ACCEPTABLE
public static final int HTTP_NOT_ACCEPTABLEHTTP Status-Code 406: Not Acceptable.- See Also:
-
HTTP_PROXY_AUTH
public static final int HTTP_PROXY_AUTHHTTP Status-Code 407: Proxy Authentication Required.- See Also:
-
HTTP_CLIENT_TIMEOUT
public static final int HTTP_CLIENT_TIMEOUTHTTP Status-Code 408: Request Time-Out.- See Also:
-
HTTP_CONFLICT
public static final int HTTP_CONFLICTHTTP Status-Code 409: Conflict.- See Also:
-
HTTP_GONE
public static final int HTTP_GONEHTTP Status-Code 410: Gone.- See Also:
-
HTTP_LENGTH_REQUIRED
public static final int HTTP_LENGTH_REQUIREDHTTP Status-Code 411: Length Required.- See Also:
-
HTTP_PRECON_FAILED
public static final int HTTP_PRECON_FAILEDHTTP Status-Code 412: Precondition Failed.- See Also:
-
HTTP_ENTITY_TOO_LARGE
public static final int HTTP_ENTITY_TOO_LARGEHTTP Status-Code 413: Request Entity Too Large.- See Also:
-
HTTP_REQ_TOO_LONG
public static final int HTTP_REQ_TOO_LONGHTTP Status-Code 414: Request-URI Too Large.- See Also:
-
HTTP_UNSUPPORTED_TYPE
public static final int HTTP_UNSUPPORTED_TYPEHTTP Status-Code 415: Unsupported Media Type.- See Also:
-
HTTP_INTERNAL_ERROR
public static final int HTTP_INTERNAL_ERRORHTTP Status-Code 500: Internal Server Error.- See Also:
-
HTTP_NOT_IMPLEMENTED
public static final int HTTP_NOT_IMPLEMENTEDHTTP Status-Code 501: Not Implemented.- See Also:
-
HTTP_BAD_GATEWAY
public static final int HTTP_BAD_GATEWAYHTTP Status-Code 502: Bad Gateway.- See Also:
-
HTTP_UNAVAILABLE
public static final int HTTP_UNAVAILABLEHTTP Status-Code 503: Service Unavailable.- See Also:
-
HTTP_GATEWAY_TIMEOUT
public static final int HTTP_GATEWAY_TIMEOUTHTTP Status-Code 504: Gateway Timeout.- See Also:
-
HTTP_VERSION
public static final int HTTP_VERSIONHTTP Status-Code 505: HTTP Version Not Supported.- See Also:
-
DEFAULT_INITIAL_WINDOW_SIZE
public static final int DEFAULT_INITIAL_WINDOW_SIZEFrom the HTTP/2 specs, the default initial window size for all streams is 64 KiB. (Chrome 25 uses 10 MiB).- See Also:
-
HEADER_TABLE_SIZE
public static final int HEADER_TABLE_SIZEHTTP/2: Size in bytes of the table used to decode the sender's header blocks.- See Also:
-
ENABLE_PUSH
public static final int ENABLE_PUSHHTTP/2: The peer must not send a PUSH_PROMISE frame when this is 0.- See Also:
-
MAX_CONCURRENT_STREAMS
public static final int MAX_CONCURRENT_STREAMSSender's maximum number of concurrent streams.- See Also:
-
MAX_FRAME_SIZE
public static final int MAX_FRAME_SIZEHTTP/2: Size in bytes of the largest frame payload the sender will accept.- See Also:
-
MAX_HEADER_LIST_SIZE
public static final int MAX_HEADER_LIST_SIZEHTTP/2: Advisory only. Size in bytes of the largest header list the sender will accept.- See Also:
-
INITIAL_WINDOW_SIZE
public static final int INITIAL_WINDOW_SIZEWindow size in bytes.- See Also:
-
HOST
The header Host- See Also:
-
SERVER
The header Server- See Also:
-
AGE
The header Age- See Also:
-
ALLOW
The header Allow- See Also:
-
EXPIRES
The header Expires- See Also:
-
COOKIE
The header Cookie- See Also:
-
SET_COOKIE
The header Set-Cookie- See Also:
-
ENCODING
The header Encoding- See Also:
-
UPGRADE
The header Upgrade- See Also:
-
TRAILERS
The header Trailers- See Also:
-
LOCATION
The header Location- See Also:
-
CONNECTION
The header Connection- See Also:
-
DATE
The header Date- See Also:
-
ETAG
The header Etag- See Also:
-
EXPECT
The header Expect- See Also:
-
FROM
The header From- See Also:
-
LINK
The header Link- See Also:
-
VARY
The header Vary- See Also:
-
VIA
The header Via- See Also:
-
RANGE
The header Range- See Also:
-
REFERER
The header Referer- See Also:
-
REFRESH
The header Refresh- See Also:
-
TE
The header te- See Also:
-
IF_MATCH
The header If-Match- See Also:
-
IF_RANGE
The header If-Range- See Also:
-
ACCEPT
The header Accept- See Also:
-
ACCEPT_CHARSET
The header Accept-Charset- See Also:
-
ACCEPT_ENCODING
The header Accept-Encoding- See Also:
-
ACCEPT_LANGUAGE
The header Accept-Language- See Also:
-
ACCEPT_RANGES
The header Accept-Ranges- See Also:
-
CONTENT_ENCODING
The header Content-Encoding- See Also:
-
CONTENT_LANGUAGE
The header Content-Language- See Also:
-
CONTENT_LENGTH
The header Content-Length- See Also:
-
CONTENT_LOCATION
The header Content-Location- See Also:
-
CONTENT_MD5
The header Content-MD5- See Also:
-
CONTENT_RANGE
The header Content-Range- See Also:
-
CONTENT_TYPE
The header Content-Type- See Also:
-
CONTENT_DISPOSITION
The header Content-Disposition- See Also:
-
TRANSFER_ENCODING
The header Transfer-Encoding- See Also:
-
CACHE_CONTROL
The header Cache-Control- See Also:
-
USER_AGENT
The header User-Agent- See Also:
-
RETRY_AFTER
The header Retry-After- See Also:
-
MAX_FORWARDS
The header Max-Forwards- See Also:
-
KEEP_ALIVE
The header Keep-Alive- See Also:
-
AUTHORIZATION
The header Authorization- See Also:
-
PROXY_AUTHORIZATION
The header Proxy-Authorization- See Also:
-
PROXY_CONNECTION
The header Proxy-Connection- See Also:
-
WWW_AUTHENTICATE
The header WWW-Authenticate- See Also:
-
PROXY_AUTHENTICATE
The header Proxy-Authenticate- See Also:
-
HTTPD_PREEMPTIVE
The header Httpd-Preemptive- See Also:
-
LAST_MODIFIED
The header Last-Modified- See Also:
-
IF_UNMODIFIED_SINCE
The header If-Unmodified-Since- See Also:
-
IF_MODIFIED_SINCE
The header If-Modified-Since- See Also:
-
IF_NONE_MATCH
The header If-None-Match- See Also:
-
SEC_WEBSOCKET_KEY
The header Sec-WebSocket-Key- See Also:
-
SEC_WEBSOCKET_ACCEPT
The header Sec-WebSocket-Accept- See Also:
-
SEC_WEBSOCKET_VERSION
The header Sec-WebSocket-Version- See Also:
-
ACCESS_CONTROL_ALLOW_ORIGIN
The header Sec-WebSocket-Version- See Also:
-
STRICT_TRANSPORT_SECURITY
The header Sec-WebSocket-Version- See Also:
-
SOAPACTION
The header SOAPAction- See Also:
-
TARGET_METHOD_UTF8
The use method- See Also:
-
RESPONSE_STATUS_UTF8
The use status- See Also:
-
TARGET_PATH_UTF8
The use path- See Also:
-
TARGET_SCHEME_UTF8
The use scheme- See Also:
-
TARGET_AUTHORITY_UTF8
The use authority- See Also:
-
FORM
The use form data- See Also:
-
JSON
The use json data- See Also:
-
XML
The use xml data- See Also:
-
PROTOBUF
The use protobuf data- See Also:
-
-
Constructor Details
-
HTTP
public HTTP()
-
-
Method Details
-
invalidatesCache
WebDAV- Parameters:
method- 请求方式- Returns:
- the boolean
-
requiresRequestBody
WebDAV CalDAV/CardDAV(在WebDAV版本中定义)- Parameters:
method- 请求方式- Returns:
- the boolean
-
permitsRequestBody
许可维护请求体- Parameters:
method- 请求方式- Returns:
- the boolean
-
redirectsWithBody
(WebDAV)重定向也应该维护请求体- Parameters:
method- 请求方式- Returns:
- the boolean
-
redirectsToGet
除了PROPFIND之外的所有请求都应该重定向到GET请求- Parameters:
method- 请求方式- Returns:
- the boolean
-