com.parse.http

## Class ParseHttpRequest.Builder

- java.lang.Object
- - com.parse.http.ParseHttpRequest.Builder

Enclosing class:
  ParseHttpRequest

    public static final class ParseHttpRequest.Builder
    extends Object

Builder of `ParseHttpRequest`.

### Constructor Summary

Constructors
Constructor and Description
`ParseHttpRequest.Builder()` Creates an empty `Builder`.
`ParseHttpRequest.Builder(ParseHttpRequest request)` Creates a new `Builder` based on the given `ParseHttpRequest`.

### Method Summary

Methods
`ParseHttpRequest.Builder` `addHeader(String name, String value)` Adds a header to this `Builder`.
`ParseHttpRequest.Builder` `addHeaders(Map<String,String> headers)` Adds headers to this `Builder`.
`ParseHttpRequest` `build()` Builds a `ParseHttpRequest` based on this `Builder`.
`ParseHttpRequest.Builder` `setBody(ParseHttpBody body)` Sets the `ParseHttpBody` of this `Builder`.
`ParseHttpRequest.Builder` `setHeaders(Map<String,String> headers)` Sets headers of this `Builder`.
`ParseHttpRequest.Builder` `setMethod(ParseHttpRequest.Method method)` Sets the `ParseHttpRequest.Method` of this `Builder`.
`ParseHttpRequest.Builder` `setUrl(String url)` Sets the url of this `Builder`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ParseHttpRequest.Builder

    public ParseHttpRequest.Builder()

Creates an empty `Builder`.

#### ParseHttpRequest.Builder

    public ParseHttpRequest.Builder(ParseHttpRequest request)

Creates a new `Builder` based on the given `ParseHttpRequest`.

Parameters:
  `request` - The `ParseHttpRequest` where the `Builder`'s values come from.

### Method Detail

#### setUrl

    public ParseHttpRequest.Builder setUrl(String url)

Sets the url of this `Builder`.

Parameters:
  `url` - The url of this `Builder`.
Returns:
  This `Builder`.

#### setMethod

    public ParseHttpRequest.Builder setMethod(ParseHttpRequest.Method method)

Sets the `ParseHttpRequest.Method` of this `Builder`.

Parameters:
  `method` - The `ParseHttpRequest.Method` of this `Builder`.
Returns:
  This `Builder`.

#### setBody

    public ParseHttpRequest.Builder setBody(ParseHttpBody body)

Sets the `ParseHttpBody` of this `Builder`.

Parameters:
  `body` - The `ParseHttpBody` of this `Builder`.
Returns:
  This `Builder`.

#### addHeader

    public ParseHttpRequest.Builder addHeader(String name,
                                     String value)

Adds a header to this `Builder`.

Parameters:
  `name` - The name of the header.
  `value` - The value of the header.
Returns:
  This `Builder`.

#### addHeaders

    public ParseHttpRequest.Builder addHeaders(Map<String,String> headers)

Adds headers to this `Builder`.

Parameters:
  `headers` - The headers that need to be added.
Returns:
  This `Builder`.

#### setHeaders

    public ParseHttpRequest.Builder setHeaders(Map<String,String> headers)

Sets headers of this `Builder`. All existing headers will be cleared.

Parameters:
  `headers` - The headers of this `Builder`.
Returns:
  This `Builder`.

#### build

    public ParseHttpRequest build()

Builds a `ParseHttpRequest` based on this `Builder`.

Returns:
  A `ParseHttpRequest` built on this `Builder`.