Package org.miaixz.bus.core.net
Class HTTP
java.lang.Object
org.miaixz.bus.core.net.HTTP
-
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
-
NONE
-
GET
-
POST
-
PUT
-
PATCH
-
DELETE
-
HEAD
-
TRACE
-
CONNECT
-
OPTIONS
-
BEFORE
-
AFTER
-
MOVE
-
PROPPATCH
-
REPORT
-
PROPFIND
-
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
-
SERVER
-
AGE
-
ALLOW
-
EXPIRES
-
COOKIE
-
SET_COOKIE
-
ENCODING
-
UPGRADE
-
TRAILERS
-
LOCATION
-
CONNECTION
-
DATE
-
ETAG
-
EXPECT
-
FROM
-
LINK
-
VARY
-
VIA
-
RANGE
-
REFERER
-
REFRESH
-
TE
-
IF_MATCH
-
IF_RANGE
-
ACCEPT
-
ACCEPT_CHARSET
-
ACCEPT_ENCODING
-
ACCEPT_LANGUAGE
-
ACCEPT_RANGES
-
CONTENT_ENCODING
-
CONTENT_LANGUAGE
-
CONTENT_LENGTH
-
CONTENT_LOCATION
-
CONTENT_MD5
-
CONTENT_RANGE
-
CONTENT_TYPE
-
CONTENT_DISPOSITION
-
TRANSFER_ENCODING
-
CACHE_CONTROL
-
USER_AGENT
-
RETRY_AFTER
-
MAX_FORWARDS
-
KEEP_ALIVE
-
AUTHORIZATION
-
PROXY_AUTHORIZATION
-
PROXY_CONNECTION
-
WWW_AUTHENTICATE
-
PROXY_AUTHENTICATE
-
HTTPD_PREEMPTIVE
-
LAST_MODIFIED
-
IF_UNMODIFIED_SINCE
-
IF_MODIFIED_SINCE
-
IF_NONE_MATCH
-
SEC_WEBSOCKET_KEY
-
SEC_WEBSOCKET_ACCEPT
-
SEC_WEBSOCKET_VERSION
-
ACCESS_CONTROL_ALLOW_ORIGIN
-
STRICT_TRANSPORT_SECURITY
-
SOAPACTION
-
TARGET_METHOD_UTF8
-
RESPONSE_STATUS_UTF8
-
TARGET_PATH_UTF8
-
TARGET_SCHEME_UTF8
-
TARGET_AUTHORITY_UTF8
-
FORM
-
JSON
-
XML
-
PROTOBUF
-
-
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
-