Package com.parse.http
Class ParseHttpRequest.Builder
- java.lang.Object
-
- com.parse.http.ParseHttpRequest.Builder
-
- Enclosing class:
- ParseHttpRequest
public static final class ParseHttpRequest.Builder extends java.lang.Object
Builder ofParseHttpRequest
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates an emptyBuilder
.Builder(ParseHttpRequest request)
Creates a newBuilder
based on the givenParseHttpRequest
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParseHttpRequest.Builder
addHeader(java.lang.String name, java.lang.String value)
Adds a header to thisBuilder
.ParseHttpRequest.Builder
addHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Adds headers to thisBuilder
.ParseHttpRequest
build()
Builds aParseHttpRequest
based on thisBuilder
.ParseHttpRequest.Builder
setBody(ParseHttpBody body)
Sets theParseHttpBody
of thisBuilder
.ParseHttpRequest.Builder
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets headers of thisBuilder
.ParseHttpRequest.Builder
setMethod(ParseHttpRequest.Method method)
Sets theParseHttpRequest.Method
of thisBuilder
.ParseHttpRequest.Builder
setUrl(java.lang.String url)
Sets the url of thisBuilder
.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates an emptyBuilder
.
-
Builder
public Builder(ParseHttpRequest request)
Creates a newBuilder
based on the givenParseHttpRequest
.- Parameters:
request
- TheParseHttpRequest
where theBuilder
's values come from.
-
-
Method Detail
-
setUrl
public ParseHttpRequest.Builder setUrl(java.lang.String url)
Sets the url of thisBuilder
.- Parameters:
url
- The url of thisBuilder
.- Returns:
- This
Builder
.
-
setMethod
public ParseHttpRequest.Builder setMethod(ParseHttpRequest.Method method)
Sets theParseHttpRequest.Method
of thisBuilder
.- Parameters:
method
- TheParseHttpRequest.Method
of thisBuilder
.- Returns:
- This
Builder
.
-
setBody
public ParseHttpRequest.Builder setBody(ParseHttpBody body)
Sets theParseHttpBody
of thisBuilder
.- Parameters:
body
- TheParseHttpBody
of thisBuilder
.- Returns:
- This
Builder
.
-
addHeader
public ParseHttpRequest.Builder addHeader(java.lang.String name, java.lang.String value)
Adds a header to thisBuilder
.- Parameters:
name
- The name of the header.value
- The value of the header.- Returns:
- This
Builder
.
-
addHeaders
public ParseHttpRequest.Builder addHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Adds headers to thisBuilder
.- Parameters:
headers
- The headers that need to be added.- Returns:
- This
Builder
.
-
setHeaders
public ParseHttpRequest.Builder setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets headers of thisBuilder
. All existing headers will be cleared.- Parameters:
headers
- The headers of thisBuilder
.- Returns:
- This
Builder
.
-
build
public ParseHttpRequest build()
Builds aParseHttpRequest
based on thisBuilder
.- Returns:
- A
ParseHttpRequest
built on thisBuilder
.
-
-