Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 2.26 KB

request_configuration.rst

File metadata and controls

44 lines (38 loc) · 2.26 KB

Request Configuration

This topic introduces the currently supported ~tensorbay.client.requests.Config options(Table. %s <request_config_table>) for customizing request. Note that the default settings can satisfy most use cases.

Requests Configuration Tables
Variables Description

max_retries

The number of maximum retry times of the request.
If the request method is one of the allowed_retry_methods
and the response status is one of the allowed_retry_status,
then the request can auto-retry max_retries times.
Scenario: Enlarge it when under poor network quality.
Default: 3 times.

allowed_retry_methods

The allowed methods for retrying request.
Default: ["HEAD", "OPTIONS", "POST", "PUT"]

allowed_retry_status

The allowed status for retrying request.
Default: [429, 500, 502, 503, 504]

timeout

The number of seconds before the request times out.
Scenario: Enlarge it when under poor network quality.
Default: 30 seconds.

is_internal

Whether the request is from internal or not.
Scenario: Set it to True for quicker network speed when datasets
and cloud servers are in the same region.
See advanced_features/use_internal_endpoint:Use Internal Endpoint for details.
Default: False

Usage

../../../docs/code/request_configuration.py