Package zowe.client.sdk.rest
Class JsonPostRequest
- java.lang.Object
-
- zowe.client.sdk.rest.ZoweRequest
-
- zowe.client.sdk.rest.JsonPostRequest
-
public class JsonPostRequest extends ZoweRequest
Http post operation with Json content type- Version:
- 1.0
- Author:
- Frank Giordano
-
-
Field Summary
-
Fields inherited from class zowe.client.sdk.rest.ZoweRequest
client, connection, httpResponse, localContext, X_CSRF_ZOSMF_HEADER_KEY, X_CSRF_ZOSMF_HEADER_VALUE
-
-
Constructor Summary
Constructors Constructor Description JsonPostRequest(ZOSConnection connection, String url, String body)
JsonPostRequest constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
executeRequest()
Execute the formulated http requestvoid
setHeaders(Map<String,String> headers)
Set any headers needed for the http requestvoid
setRequest(String url)
Set the following incoming url with a new http requestvoid
setStandardHeaders()
Set the standard headers for the http request-
Methods inherited from class zowe.client.sdk.rest.ZoweRequest
executeJsonRequest, executeStreamRequest, executeTextRequest, requestType, setup
-
-
-
-
Constructor Detail
-
JsonPostRequest
public JsonPostRequest(ZOSConnection connection, String url, String body) throws Exception
JsonPostRequest constructor.- Parameters:
connection
- connection information, see ZOSConnection objecturl
- rest url valuebody
- data to be attached to the request- Throws:
Exception
- error setting constructor variables
-
-
Method Detail
-
executeRequest
public Response executeRequest() throws Exception
Execute the formulated http request- Specified by:
executeRequest
in classZoweRequest
- Returns:
- Response value
- Throws:
Exception
- error executing request
-
setStandardHeaders
public void setStandardHeaders()
Set the standard headers for the http request- Specified by:
setStandardHeaders
in classZoweRequest
-
setHeaders
public void setHeaders(Map<String,String> headers)
Set any headers needed for the http request- Specified by:
setHeaders
in classZoweRequest
- Parameters:
headers
- headers to add to the request
-
setRequest
public void setRequest(String url) throws Exception
Set the following incoming url with a new http request- Specified by:
setRequest
in classZoweRequest
- Parameters:
url
- rest url end point- Throws:
Exception
- error setting the http request
-
-