RequestHandler
- class core.zowe.core_for_zowe_sdk.RequestHandler(session_arguments)
Class used to handle HTTP/HTTPS requests.
- session_arguments
Zowe SDK session arguments
- Type
dict
- valid_methods
List of supported request methods
- Type
list
- perform_request(method, request_arguments, expected_code=[200])
Execute an HTTP/HTTPS requests from given arguments and return validated response (JSON).
- Parameters
method (str) – The request method that should be used
request_arguments (dict) – The dictionary containing the required arguments for the execution of the request
expected_code (int) – The list containing the acceptable response codes (default is [200])
- Returns
normalized_response – normalized request response in json (dictionary)
- Return type
json
- perform_streamed_request(method, request_arguments, expected_code=[200])
Execute a streamed HTTP/HTTPS requests from given arguments and return a raw response.
- Parameters
method (str) – The request method that should be used
request_arguments (dict) – The dictionary containing the required arguments for the execution of the request
expected_code (int) – The list containing the acceptable response codes (default is [200])
- Return type
A raw response data