Package org.alfresco.rest.core
Class RestRequest
- java.lang.Object
-
- org.alfresco.rest.core.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.StringgetBody()java.lang.StringgetContentType()org.springframework.http.HttpMethodgetHttpMethod()java.lang.StringgetPath()java.lang.Object[]getPathParams()static RestRequestrequestWithBody(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 providedvoidsetBody(java.lang.String body)voidsetContentType(java.lang.String contentType)voidsetHttpMethod(org.springframework.http.HttpMethod httpMethod)voidsetPath(java.lang.String path)voidsetPathParams(java.lang.Object[] pathParams)static RestRequestsimpleRequest(org.springframework.http.HttpMethod httpMethod, java.lang.String path, java.lang.String... pathParams)Use this request when no body is neededjava.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-