Package org.alfresco.rest.core
Class RestRequest
java.lang.Object
org.alfresco.rest.core.RestRequest
- Author:
- Paul Brodner
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()org.springframework.http.HttpMethodgetPath()Object[]static RestRequestrequestWithBody(org.springframework.http.HttpMethod httpMethod, String body, String path, String... pathParams) Use this request when a body has to be providedvoidvoidsetContentType(String contentType) voidsetHttpMethod(org.springframework.http.HttpMethod httpMethod) voidvoidsetPathParams(Object[] pathParams) static RestRequestsimpleRequest(org.springframework.http.HttpMethod httpMethod, String path, String... pathParams) Use this request when no body is neededtoString()
-
Method Details
-
simpleRequest
public static RestRequest simpleRequest(org.springframework.http.HttpMethod httpMethod, String path, 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, String body, String path, String... pathParams) Use this request when a body has to be provided- Parameters:
httpMethod-body-path-pathParams-- Returns:
-
getBody
-
setBody
-
getHttpMethod
public org.springframework.http.HttpMethod getHttpMethod() -
setHttpMethod
public void setHttpMethod(org.springframework.http.HttpMethod httpMethod) -
getPath
-
setPath
-
getPathParams
-
setPathParams
-
getContentType
-
setContentType
-
toString
- Overrides:
toStringin classObject- Throws:
MissingFormatArgumentException- If there are not enough pathParams for the path.
-