invoke_request(self,
service_path,
path,
http_method,
headers=None,
params=None,
data=None,
files=None,
stream=False)
|
|
Make a general request to the PLDB Server
- Parameters:
service_path (string) - The base path for the REST resource to be called
path (string) - A string that is the addition to the PLDB Base REST URL
specifying the method (e.g. '/structures')
http_method (requests.get or requests.post, etc) - The requests HTTP request method used to invoked the request
params (dict) - A dict mapping query string parameters to their respective values
(default: {})
data (dict or string) - POST params (dict or plain string)
files (dict) - A dict mapping the file type to the respective file handle
stream (bool) - Set True to stream content downloads for e.g. large files or
binary data (default: False)
- Returns:
- The JSON-loaded response from the server, with no alterations
- Raises:
requests.exceptions.HTTPError - if request fails
|