Class HttpRequest


  • public final class HttpRequest
    extends Object
    An HttpRequest encapsulates the details of an HTTP request over the HTTP service.
    • Method Detail

      • getUrl

        public String getUrl()
        Returns the URL that the request will be performed against.
        Returns:
        the URL that the request will be performed against.
      • getMethod

        public HttpMethod getMethod()
        Returns the HTTP method of the request.
        Returns:
        the HTTP method of the request.
      • getAuthUrl

        public String getAuthUrl()
        Returns the URL that will be used to capture cookies for authentication before the actual request is executed.
        Returns:
        the URL that will be used to capture cookies for authentication before the actual request is executed.
      • getHeaders

        public Map<String,​Collection<String>> getHeaders()
        Returns the headers that will be included in the request.
        Returns:
        the headers that will be included in the request.
      • getCookies

        public Map<String,​String> getCookies()
        Returns the cookies that will be included in the request.
        Returns:
        the cookies that will be included in the request.
      • getBody

        public Object getBody()
        Returns the body that will be included in the request.
        Returns:
        the body that will be included in the request.
      • getEncodeBodyAsJson

        public Boolean getEncodeBodyAsJson()
        Returns whether or not the included body should be encoded as extended JSON when sent to the url in this request.
        Returns:
        whether or not the included body should be encoded as extended JSON when sent to the url in this request.
      • getForm

        public Map<String,​String> getForm()
        Returns the form that will be included in the request.
        Returns:
        the form that will be included in the request.
      • getFollowRedirects

        public Boolean getFollowRedirects()
        Returns whether or not Stitch should follow redirects while executing the request. Defaults to false.
        Returns:
        whether or not Stitch should follow redirects while executing the request. Defaults to false.