okhttp / okhttp3 / Response / Builder


class Builder


Name Summary
<init> Builder()


Name Summary
addHeader Adds a header with name to value. Prefer this method for multiply-valued headers like “Set-Cookie”.open fun addHeader(name:String, value:String): Builder
body open fun body(body:ResponseBody?): Builder
build open fun build():Response
cacheResponse open fun cacheResponse(cacheResponse:Response?): Builder
code open fun code(code:Int): Builder
handshake open fun handshake(handshake:Handshake?): Builder
header Sets the header named name to value. If this request already has any headers with that name, they are all replaced.open fun header(name:String, value:String): Builder
headers Removes all headers on this builder and adds headers.open fun headers(headers:Headers): Builder
message open fun message(message:String): Builder
networkResponse open fun networkResponse(networkResponse:Response?): Builder
priorResponse open fun priorResponse(priorResponse:Response?): Builder
protocol open fun protocol(protocol:Protocol): Builder
receivedResponseAtMillis open fun receivedResponseAtMillis(receivedResponseAtMillis:Long): Builder
removeHeader Removes all headers named name on this builder.open fun removeHeader(name:String): Builder
request open fun request(request:Request): Builder
sentRequestAtMillis open fun sentRequestAtMillis(sentRequestAtMillis:Long): Builder