Request and Response¶
Request¶
- class oci.request.Request(method, url, query_params=None, header_params=None, body=None, response_type=None, enforce_content_headers=True)¶
Attributes:
Request body
Whether content headers should be added for PUT and POST requests when not present.
Request header params
The HTTP method
Query parameters in the url
Response data type
URL that will serve the request
- body¶
Request body
- enforce_content_headers¶
Whether content headers should be added for PUT and POST requests when not present. Defaults to True.
- Type
bool
- header_params¶
Request header params
- Type
dict(str, str)
- method¶
The HTTP method
- Type
str
- query_params¶
Query parameters in the url
- Type
dict(str, str)
- response_type¶
Response data type
- Type
str
- url¶
URL that will serve the request
- Type
str
Response¶
- class oci.response.Response(status, headers, data, request)¶
Attributes:
The response data.
Gets a value representing whether or not there is a next page of results in a list Response.
The HTTP headers for the Response
The value of the opc-next-page response header.
The corresponding request for this response.
The ID of the request that generated this response.
The HTTP status code for the Response
- data¶
The response data. The type of data depends on the request.
- property has_next_page¶
Gets a value representing whether or not there is a next page of results in a list Response.
- Return type
bool
- headers¶
The HTTP headers for the Response
- Type
requests.structures.CaseInsensitiveDict
- next_page¶
The value of the opc-next-page response header.
- Type
str
- request_id¶
The ID of the request that generated this response.
- Type
str
- status¶
The HTTP status code for the Response
- Type
int