json_protocol: JSON Protocol Implementation to Connect API Server
Description
Protocol is an abstraction which allows to send data to server.
This function implements JSON-based protocol. It provides token in
'Authorization' header.
Usage
json_protocol(server, error = .error)
Arguments
error
An error handling function.
Value
A function that implements JSON protocol.