This class provide fetch wrapper, token and Service URL setter mainly. Just to avoid code duplication.
Possibly you will need babel-polyfill to use it.
Custom error message for Bad Request server response
message
(string | null) error details (optional, defaultnull
)
Custom error message for cache fail
message
(string | null) error details (optional, defaultnull
)
Custom error message for Not Found server response
message
(string | null) error details (optional, defaultnull
)
Custom error message for abstract server response
statusCode
number http status codestatusText
string http status code textmessage
(string | null) error details (optional, defaultnull
)
TM Micro Service Proto API
url
string service urltoken
(string | null) user access tocken if available (optional, defaultnull
)
Service URL
service
string url
User access token
token
(string | null)? user access tocken if available
Object with class service messages
Type: Object
Set access token
token
string access token
Set service version
version
string service version
Validate service version
Returns string version - service version
Fetch remote resource
Returns Promise Promise with server Response
Service version
version
string? service version