flowserv.service.remote module
Helper functions for the remote service client.
- flowserv.service.remote.delete(url: str)
Send DELETE request to given URL.
- Parameters
url (string) – Request URL.
- flowserv.service.remote.download_file(url: str) IO
Download a remote file.
- Parameters
url (string) – Request URL.
- Return type
io.BytesIO
- flowserv.service.remote.get(url: str) Dict
Send GET request to given URL and return the JSON body.
- Parameters
url (string) – Request URL.
- Return type
dict
- flowserv.service.remote.headers() Dict
Get dictionary of header elements for HTTP requests to a remote API.
- Return type
dict
- flowserv.service.remote.post(url: str, files: Optional[List] = None, data: Optional[Dict] = None) Dict
Send POST request with given (optional) body to a URL. Returns the JSON body from the response.
- Parameters
url (string) – Request URL.
data (dict, default=None) – Optional request body.
- Return type
dict
- flowserv.service.remote.put(url: str, data: Optional[Dict] = None) Dict
Send PUT request with given (optional) body to a URL. Returns the JSON body from the response.
- Parameters
url (string) – Request URL.
data (dict, default=None) – Optional request body.
- Return type
dict