genvid.toolbox.BaseHttpApiTool
- class genvid.toolbox.BaseHttpApiTool(**kwargs)
Bases:
BaseTool
This is the base class for the HTTP API.
- request_get(path: str, base_url: Optional[str] = None, timeout=0.0, params: Optional[dict] = None, retry_request: bool = False)
Run a GET HTTP request over the cluster service.
- Parameters:
path – The HTTP request path.
base_url – Alternative URL address.
timeout – The request timeout.
params – Parameters used for the query string.
- request_post(path: str, base_url: Optional[str] = None, timeout=0.0, params: Optional[dict] = None, data: Optional[str] = None, json_data=None)
Run a POST HTTP request over the cluster service.
- Parameters:
path – The HTTP request path.
base_url – Alternative URL address.
timeout – The request timeout.
params – Parameters used for the query string.
json_data – A dictionary that will be transform into JSON.
data – The text data.
Changed in version 1.41.0:: Returns an
OrderedDict
.
- request_put(path: str, base_url: Optional[str] = None, timeout=0.0, params: Optional[dict] = None, data: Optional[str] = None, json_data=None)
Run a PUT HTTP request over the cluster service.
- Parameters:
path – The HTTP request path.
base_url – Alternative URL address.
timeout – The request timeout.
params – Parameters used for the query string.
json_data – A dictionary that will be transform into JSON.
data – The text data.
Changed in version 1.41.0:: Returns an
OrderedDict
.
- request_delete(path: str, base_url: Optional[str] = None, timeout=0.0, params: Optional[dict] = None, data: Optional[str] = None, json_data=None)
Run a DELETE HTTP request over the cluster service.
- Parameters:
path – The HTTP request path.
base_url – Alternative URL address.
timeout – The request timeout.
params – Parameters used for the query string.
json_data – A dictionary that will be transform into JSON.
data – The text data.
Changed in version 1.41.0:: Returns an
OrderedDict
.
- class httpapi.BaseHttpApiTool
Implementation of
genvid.toolbox.BaseHttpApiTool