azure.purview.catalog.core.rest package¶
-
exception
azure.purview.catalog.core.rest.
StreamConsumedError
[source]¶ -
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
args
¶
-
-
exception
azure.purview.catalog.core.rest.
ResponseNotReadError
[source]¶ -
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
args
¶
-
-
exception
azure.purview.catalog.core.rest.
ResponseClosedError
[source]¶ -
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
args
¶
-
-
class
azure.purview.catalog.core.rest.
HttpRequest
[source]¶ Represents an HTTP request.
- Parameters
- Keyword Arguments
params (mapping or sequence) – Query parameters to be mapped into your URL. Your input should be a mapping or sequence of query name to query value(s).
headers (mapping or sequence) – HTTP headers you want in your request. Your input should be a mapping or sequence of header name to header value.
json (any) – A JSON serializable object. We handle JSON-serialization for your object, so use this for more complicated data structures than data.
content (str or bytes or iterable[bytes] or asynciterable[bytes]) – Content you want in your request body. Think of it as the kwarg you should input if your data doesn’t fit into json, data, or files. Accepts a bytes type, or a generator that yields bytes.
data (dict) – Form data you want in your request body. Use for form-encoded data, i.e. HTML forms.
files (mapping or sequence) – Files you want to in your request body. Use for uploading files with multipart encoding. Your input should be a mapping or sequence of file name to file content. Use the data kwarg in addition if you want to include non-file data files as part of your request.
- Variables
-
property
content
¶ Gets the request content.
-
property
headers
¶
-
property
method
¶
-
property
url
¶
-
class
azure.purview.catalog.core.rest.
HttpResponse
(*, request: azure.purview.catalog.core.rest._rest_py3.HttpRequest, **kwargs)[source]¶ -
-
iter_bytes
(chunk_size: int = None) → Iterator[bytes][source]¶ Iterate over the bytes in the response stream
-
json
() → Any¶ Returns the whole body as a json object.
- Returns
The JSON deserialized response body
- Return type
any
- Raises
json.decoder.JSONDecodeError or ValueError (in python 2.7) if object is not JSON decodable –
-
raise_for_status
() → None¶ Raises an HttpResponseError if the response has an error status code.
If response is good, does nothing.
-
property
content
¶ Return the response’s content in bytes.
-
property
content_type
¶ Content Type of the response
-
property
encoding
¶ Returns the response encoding. By default, is specified by the response Content-Type header.
-
property
headers
¶ Returns the response headers
-
property
num_bytes_downloaded
¶ See how many bytes of your stream response have been downloaded
-
property
reason
¶ Returns the reason phrase for the response
-
property
request
¶
-
property
status_code
¶ Returns the status code of the response
-
property
text
¶ Returns the response body as a string
-
property
url
¶ Returns the URL that resulted in this response
-
-
class
azure.purview.catalog.core.rest.
AsyncHttpResponse
(*, request: azure.purview.catalog.core.rest._rest_py3.HttpRequest, **kwargs)[source]¶ -
-
iter_bytes
(chunk_size: int = None) → Iterator[bytes][source]¶ Iterate over the bytes in the response stream
-
json
() → Any¶ Returns the whole body as a json object.
- Returns
The JSON deserialized response body
- Return type
any
- Raises
json.decoder.JSONDecodeError or ValueError (in python 2.7) if object is not JSON decodable –
-
raise_for_status
() → None¶ Raises an HttpResponseError if the response has an error status code.
If response is good, does nothing.
-
property
content
¶ Return the response’s content in bytes.
-
property
content_type
¶ Content Type of the response
-
property
encoding
¶ Returns the response encoding. By default, is specified by the response Content-Type header.
-
property
headers
¶ Returns the response headers
-
property
num_bytes_downloaded
¶ See how many bytes of your stream response have been downloaded
-
property
reason
¶ Returns the reason phrase for the response
-
property
request
¶
-
property
status_code
¶ Returns the status code of the response
-
property
text
¶ Returns the response body as a string
-
property
url
¶ Returns the URL that resulted in this response
-