adobe.pdfservices.operation.internal.http package

Submodules

adobe.pdfservices.operation.internal.http.http_client module

adobe.pdfservices.operation.internal.http.http_client.process_request(http_request: HttpRequest, success_status_codes: List, error_response_handler: Callable[[Response], None])

adobe.pdfservices.operation.internal.http.http_method module

class adobe.pdfservices.operation.internal.http.http_method.HttpMethod(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

DELETE = 'DELETE'
GET = 'GET'
POST = 'POST'
PUT = 'PUT'

adobe.pdfservices.operation.internal.http.http_request module

class adobe.pdfservices.operation.internal.http.http_request.HttpRequest(http_method: HttpMethod, request_key: str, url: str, headers: dict, data=None, files=None, authenticator: Authenticator = None, read_timeout=None, connect_timeout=None, retryable: bool = False, proxies: ProxyServerConfig = None)

Bases: object

adobe.pdfservices.operation.internal.http.request_header_const module

class adobe.pdfservices.operation.internal.http.request_header_const.DefaultHeaders

Bases: object

ACCEPT_HEADER_NAME = 'Accept'
AUTHORIZATION_HEADER_NAME = 'Authorization'
CONTENT_TYPE_HEADER_NAME = 'Content-Type'
DC_APP_INFO_HEADER_KEY = 'x-api-app-info'
DC_REQUEST_ID_HEADER_KEY = 'x-request-id'
JSON_TXT_CONTENT_TYPE = 'application/json, text/plain, */*'
LOCATION_HEADER_NAME = 'location'
SESSION_TOKEN_REQUEST_ID_HEADER_KEY = 'X-DEBUG-ID'
X_API_KEY_HEADER_NAME = 'x-api-key'
X_DCSDK_OPS_INFO_HEADER_NAME = 'x-dcsdk-ops-info'

adobe.pdfservices.operation.internal.http.response_util module

class adobe.pdfservices.operation.internal.http.response_util.ResponseUtil

Bases: object

CUSTOM_ERROR_MESSAGES_STATUS_CODE_MAPPING = {413: {'error_code': 'RequestEntityTooLarge', 'message': 'Request entity too large'}, 502: {'error_code': 'BadGateway', 'message': 'Bad gateway'}, 503: {'error_code': 'ServiceUnavaibale', 'message': 'The Gateway servers are up, but overloaded with requests. Try again later.'}, 504: {'error_code': 'Gateway Timeout', 'message': "The Gateway servers are up, but the request couldn't be serviced due to some failure within our stack. Try again later."}}
INTEGRATION_SERVICE_USAGE_LIMIT_REACHED_ERROR_MESSAGE = 'Service usage limit has been reached for the integration. Please retry after sometime.'
QUOTA_ERROR_MESSAGE = 'Either Quota for this operation is not available or Free trial quota is exhausted. Please visit (www.adobe.com/go/pdftoolsapi_home) to start using free trial quota or (www.adobe.com/go/pdftoolsapi_err_quota) to upgrade to paid credentials.'
SERVICE_USAGE_EXCEPTION_STATUS_CODE_429001_STRING = '429001'
SERVICE_USAGE_EXCEPTION_STATUS_CODE_429002_STRING = '429002'
SERVICE_USAGE_LIMIT_REACHED_ERROR_MESSAGE = 'Service usage limit has been reached. Please retry after sometime.'
static get_request_tracking_id_from_response(response: Response, is_ims_api_call)
static handle_api_failures(response: Response, request_key, is_ims_call=False)
static handle_service_api_error_response(response)
static handle_service_usage_failure(response: Response)
static handle_upload_asset_failure(response: Response, request_key: str)

Module contents