RequestMixin offer a common interface to access low-level network resources
Methods
-
<static> $access(request)
-
Method to manage HTTP requests
Authentication management (Authorization & Bearer)
Parameters:
Name Type Description request
Object The Request object
Returns:
Asynchronous call
- Type
- Promise
-
<static> $authHeaders(headers)
-
Set
Authorization
HTTP Header (if available)Parameters:
Name Type Description headers
Object (optional) HTTP Headers
Returns:
HTTP Headers with
Authorization
(if available)- Type
- Object
-
<static> createRequest(uri, method)
-
Common Method for components which need to request on network
Parameters:
Name Type Description uri
string The URI to contact
method
string The HTTP method Verb (GET, POST, PATCH, ...)
Returns:
Asynchronous call
- Type
- Promise
-
<static> request(options)
-
Common Method for components which need to request on network
Parameters:
Name Type Description options
Object The Request object
Returns:
Asynchronous call
- Type
- Promise