Class SessionResource


public class SessionResource extends XmlResponderResource<SessionDto>
The Session Constructor resource is used to generate a unique Esendex API session GUID. A successful HTTP POST request to the Constructor URI requires a valid Basic Authentication header of Base64 encoded username and password to be supplied.
Author:
Mike Whittaker
  • Constructor Details

    • SessionResource

      public SessionResource(BasicAuthenticator auth)
      The session resource must be authenticated with Basic Authentication. Thereafter other resources may be authenticated with a SessionAuthenticator.
      Parameters:
      auth - the authenticator
  • Method Details

    • getEndpointChild

      protected String getEndpointChild()
      Gets the child portion of the url required to access the resource. The child part is appended to the base url and must not start with a '/' The base url is of the form 'http://api.esendex.com/{version}/' where version maybe similar to 'v1.0'
      Specified by:
      getEndpointChild in class Resource
      Returns:
      the child portion of the url required to access this resource
    • getRequestMethod

      protected HttpRequestMethod getRequestMethod()
      Gets the HttpRequestMethod that this service stipulates eg GET, POST, PUT, DELETE.
      Specified by:
      getRequestMethod in class Resource
      Returns:
      the required HttpRequestMethod