Class RestRequest


  • public class RestRequest
    extends java.lang.Object
    Author:
    Paul Brodner
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBody()  
      java.lang.String getContentType()  
      org.springframework.http.HttpMethod getHttpMethod()  
      java.lang.String getPath()  
      java.lang.Object[] getPathParams()  
      static RestRequest requestWithBody​(org.springframework.http.HttpMethod httpMethod, java.lang.String body, java.lang.String path, java.lang.String... pathParams)
      Use this request when a body has to be provided
      void setBody​(java.lang.String body)  
      void setContentType​(java.lang.String contentType)  
      void setHttpMethod​(org.springframework.http.HttpMethod httpMethod)  
      void setPath​(java.lang.String path)  
      void setPathParams​(java.lang.Object[] pathParams)  
      static RestRequest simpleRequest​(org.springframework.http.HttpMethod httpMethod, java.lang.String path, java.lang.String... pathParams)
      Use this request when no body is needed
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • simpleRequest

        public static RestRequest simpleRequest​(org.springframework.http.HttpMethod httpMethod,
                                                java.lang.String path,
                                                java.lang.String... pathParams)
        Use this request when no body is needed
        Parameters:
        httpMethod -
        path -
        pathParams -
        Returns:
      • requestWithBody

        public static RestRequest requestWithBody​(org.springframework.http.HttpMethod httpMethod,
                                                  java.lang.String body,
                                                  java.lang.String path,
                                                  java.lang.String... pathParams)
        Use this request when a body has to be provided
        Parameters:
        httpMethod -
        body -
        path -
        pathParams -
        Returns:
      • getBody

        public java.lang.String getBody()
      • setBody

        public void setBody​(java.lang.String body)
      • getHttpMethod

        public org.springframework.http.HttpMethod getHttpMethod()
      • setHttpMethod

        public void setHttpMethod​(org.springframework.http.HttpMethod httpMethod)
      • getPath

        public java.lang.String getPath()
      • setPath

        public void setPath​(java.lang.String path)
      • getPathParams

        public java.lang.Object[] getPathParams()
      • setPathParams

        public void setPathParams​(java.lang.Object[] pathParams)
      • getContentType

        public java.lang.String getContentType()
      • setContentType

        public void setContentType​(java.lang.String contentType)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object