Package zowe.client.sdk.rest
Class TextGetRequest
- java.lang.Object
-
- zowe.client.sdk.rest.ZoweRequest
-
- zowe.client.sdk.rest.TextGetRequest
-
public class TextGetRequest extends ZoweRequest
Http get operation with text 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 TextGetRequest(ZOSConnection connection)TextGetRequest constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseexecuteRequest()Execute the formulated http requestvoidsetHeaders(Map<String,String> headers)Set any headers needed for the http requestvoidsetRequest(String url)Initialize the http request object with an url valuevoidsetRequest(String url, String body)Initialize the http request object with an url and body valuesvoidsetStandardHeaders()Set the standard headers for the http request-
Methods inherited from class zowe.client.sdk.rest.ZoweRequest
executeJsonRequest, executeStreamRequest, executeTextRequest, requestType, setup
-
-
-
-
Constructor Detail
-
TextGetRequest
public TextGetRequest(ZOSConnection connection)
TextGetRequest constructor.- Parameters:
connection- connection information, see ZOSConnection object
-
-
Method Detail
-
executeRequest
public Response executeRequest() throws Exception
Execute the formulated http request- Specified by:
executeRequestin classZoweRequest- Returns:
- Response value
- Throws:
Exception- error executing request
-
setStandardHeaders
public void setStandardHeaders()
Set the standard headers for the http request- Specified by:
setStandardHeadersin classZoweRequest
-
setHeaders
public void setHeaders(Map<String,String> headers)
Set any headers needed for the http request- Specified by:
setHeadersin classZoweRequest- Parameters:
headers- headers to add to the request
-
setRequest
public void setRequest(String url) throws Exception
Initialize the http request object with an url value- Specified by:
setRequestin classZoweRequest- Parameters:
url- rest url end point- Throws:
Exception- error setting the http request
-
setRequest
public void setRequest(String url, String body) throws Exception
Initialize the http request object with an url and body values- Specified by:
setRequestin classZoweRequest- Parameters:
url- rest url end pointbody- data to be sent with request- Throws:
Exception- error setting the http request
-
-