| 程序包 | 说明 |
|---|---|
| cn.ponfee.commons.http | |
| cn.ponfee.commons.web |
| 类和说明 |
|---|
| ContentType
Representing http 'Content-Type' header
|
| Http
Accept属于请求头, Content-Type属于实体头
请求方的http报头结构:通用报头|请求报头|实体报头
响应方的http报头结构:通用报头|响应报头|实体报头
请求报头有:Accept、Accept-Charset、Accept-Encoding、Accept-Language、Referer、Authorization、From、Host、If-Match、User-Agent、If-Modified-Since等
Accept:告诉WEB服务器自己接受什么介质类型,*∕*表示任何类型,type∕*表示该类型下的所有子类型,type∕sub-type,如Accept(text/html)
响应报头有:Age、Server、Accept-Ranges、Vary等
实体报头有:Allow、Location、Content-Base、Content-Encoding、Content-Length、Content-Range、Content-MD5、Content-Type、Expires、Last-Modified等
Content-Type:
请求实体报头:浏览器告诉Web服务器自己发送的数据格式,如Content-Type(application/json, multipart/form-data, application/x-www-form-urlencoded)
响应实体报头:Web服务器告诉浏览器自己响应的消息格式,例如Content-Type(application/xml, application/json)
http://www.atool.org/httptest.php
Restful:https://www.cnblogs.com/pixy/p/4838268.html
http工具类
Spring RestTemplate
org.apache.httpcomponents:fluent-hc
org.apache.httpcomponents.client5:httpclient5
com.squareup.okhttp3:okhttp
|
| Http.HttpMethod
Http method
|
| HttpException
Http exception
|
| HttpRequest
A fluid interface for making HTTP requests using an underlying
HttpURLConnection (or sub-class). |
| HttpRequest.ConnectionFactory
Creates
HTTP connections for
urls. |
| HttpRequest.RequestOutputStream
Request output stream
|
| HttpRequest.UploadProgress
Callback interface for reporting upload progress for a request.
|
| HttpStatus
Enumeration of HTTP status codes.
|
| HttpStatus.Series
Enumeration of HTTP status series.
|
| 类和说明 |
|---|
| ContentType
Representing http 'Content-Type' header
|
Copyright © 2023. All rights reserved.