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
bodyRequest body enforce_content_headersWhether content headers should be added for PUT and POST requests when not present. header_paramsRequest header params methodThe HTTP method query_paramsQuery parameters in the url response_typeResponse data type urlURL that will serve the request -
body= None¶ Request body
-
enforce_content_headers= None¶ Whether content headers should be added for PUT and POST requests when not present. Defaults to True.
Type: bool
-
header_params= None¶ Request header params
Type: dict(str, str)
-
method= None¶ The HTTP method
Type: str
-
query_params= None¶ Query parameters in the url
Type: dict(str, str)
-
response_type= None¶ Response data type
Type: str
-
url= None¶ URL that will serve the request
Type: str
-
Response¶
-
class
oci.response.Response(status, headers, data, request)¶ Attributes
dataThe response data. has_next_pageGets a value representing whether or not there is a next page of results in a list Response. headersThe HTTP headers for the Response next_pageThe value of the opc-next-page response header. requestThe corresponding request for this response. request_idThe ID of the request that generated this response. statusThe HTTP status code for the Response -
data= None¶ The response data. The type of data depends on the request.
-
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= None¶ The HTTP headers for the Response
Type: requests.structures.CaseInsensitiveDict
-
next_page= None¶ The value of the opc-next-page response header.
Type: str
-
request_id= None¶ The ID of the request that generated this response.
Type: str
-
status= None¶ The HTTP status code for the Response
Type: int
-