net.adamcin.httpsig.api
Class RequestContent.Builder

java.lang.Object
  extended by net.adamcin.httpsig.api.RequestContent.Builder
Enclosing class:
RequestContent

public static final class RequestContent.Builder
extends Object


Constructor Summary
RequestContent.Builder()
           
 
Method Summary
 RequestContent.Builder addDate(Calendar calendar)
          IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate().
 RequestContent.Builder addDate(Date dateGMT)
          IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate().
 RequestContent.Builder addDateNow()
          IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate().
 RequestContent.Builder addHeader(String name, String value)
          Adds a header name and value pair
 RequestContent build()
           
 RequestContent.Builder setRequestLine(String requestLine)
          Deprecated. 
 RequestContent.Builder setRequestTarget(String method, String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestContent.Builder

public RequestContent.Builder()
Method Detail

setRequestLine

@Deprecated
public RequestContent.Builder setRequestLine(String requestLine)
Deprecated. 


setRequestTarget

public RequestContent.Builder setRequestTarget(String method,
                                               String path)

addHeader

public RequestContent.Builder addHeader(String name,
                                        String value)
Adds a header name and value pair

Parameters:
name -
value -
Returns:

addDate

public RequestContent.Builder addDate(Calendar calendar)
IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate(). This is merely a convenience method to generate a date header in the correct format.

Parameters:
calendar - the Calendar to provide
Returns:
true if the date header was successfully set. false if date is already set

addDate

public RequestContent.Builder addDate(Date dateGMT)
IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate(). This is merely a convenience method to generate a date header in the correct format.

Parameters:
dateGMT - the current date in GMT
Returns:
this RequestContent.Builder

addDateNow

public RequestContent.Builder addDateNow()
IMPORTANT: If you call this overload instead of addHeader(String, String), be sure to retrieve the generated header value to add to your client request using a subsequent call to RequestContent.getDate(). This is merely a convenience method to generate a date header in the correct format.

Returns:
this RequestContent.Builder

build

public RequestContent build()


Copyright © 2013-2014. All Rights Reserved.