btnexus-node-python.btPostRequest module¶
A post request following the BTProtocol
-
class
btPostRequest.
BTPostRequest
(intent, params, accessToken, url, callback=None, errBack=None)[source]¶ Bases:
nexus.postRequest.PostRequest
A post request following the BTProtocol
setting up the request with the btProtocol.
- Parameters
intent (String) – intent for the BTPostRequest
params (dict) – the parameters for the BTPostRequest
accessToken (String) – the accessToken
url (String) – the url of the instance to send the request to
callback (function pointer) – the callback which handles the response
errBack (function pointer) – callback to handle errors that prevent that the response can be handled by the callback. takes one argument which is the exception - This is needed for the threaded send() otherwise exceptions can’t be handled
-
send
(blocking=False, **kwargs)[source]¶ sending the request and executing the callback or errBack
- Parameters
blocking (Boolean) – decides if the call is blocking or threaded
kwargs – keyword arguments for the requests.post call see https://2.python-requests.org//en/v2.5.3/api/ - headers cant be customized for a btPostRequest because it is already used internally