Package org.miaixz.bus.http
Class Response.Builder
java.lang.Object
org.miaixz.bus.http.Response.Builder
- Enclosing class:
Response
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a header withnameandvalue.body(ResponseBody body) build()cacheResponse(Response cacheResponse) code(int code) Sets the header namednametovalue.Removes all headers on this builder and addsheaders.networkResponse(Response networkResponse) priorResponse(Response priorResponse) receivedResponseAtMillis(long receivedResponseAtMillis) removeHeader(String name) Removes all headers namednameon this builder.sentRequestAtMillis(long sentRequestAtMillis)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
request
-
protocol
-
code
-
message
-
handshake
-
header
Sets the header namednametovalue. If this request already has any headers with that name, they are all replaced. -
addHeader
Adds a header withnameandvalue. Prefer this method for multiply-valued headers like "Set-Cookie". -
removeHeader
Removes all headers namednameon this builder. -
headers
Removes all headers on this builder and addsheaders. -
body
-
networkResponse
-
cacheResponse
-
priorResponse
-
sentRequestAtMillis
-
receivedResponseAtMillis
-
build
-