# Functions
Call calls the URL endpoint, POSTing a serialized as JSON optional payload (pass nil for a GET HTTP request) and returns the result, deserializing JSON into type Q.
CallURL is Call without any options/non default headers, timeout etc and just the URL.
DebugSummary returns a string with the size and escaped first max/2 and last max/2 bytes of a buffer (or the whole escaped buffer if small enough).
Deserialize deserializes JSON as a new object of desired type.
EscapeBytes returns printable string.
Fetch is for cases where the payload is already serialized (or empty but call Get() when empty for clarity).
Fetch is Send without a payload (so will be a GET request).
FetchURL is Send without a payload and no additional options (default timeout and headers).
Get fetches and deserializes the JSON returned by the Destination into a Q struct.
GetArray fetches and deserializes the JSON returned by the Destination into a slice of Q struct (ie the response is a JSON array).
GetURL is Get without additional options (default timeout and headers).
Deprecated: use ProcessRequest instead.
NewDestination returns a Destination object set for the given url (and default/nil replacement headers and default global timeout).
NewErrorReply creates a new error reply with the message and err error.
ProcessRequest deserializes the expected type from the request body.
Reply a struct as JSON (or just writes desired HTTP status code).
ReplyClientError is a short cut for Reply() with http.StatusBadRequest as the result code.
ReplyError is to send back a client error with exception details.
ReplyNoPayload is a short cut for Reply() with empty (nil) payload.
ReplyOk is a short cut for Reply() with http.StatusOK as the result code.
ReplyServerError is a short cut for Reply() with http.StatusServiceUnavailable as the result code.
Send fetches the result from URL and sends optional payload as a POST, GET if missing.
Serialize serializes the object as json.
SetCallTimeout changes the timeout for further Call calls, returns the previous value (default in 60s).
SetHeaderIfMissing utility function to not overwrite nor append to existing headers.
# Variables
UserAgent is the User-Agent header used by client calls (also used in fhttp/).
# Structs
Destination is the URL and optional additional headers.
FetchError is a custom error type that preserves HTTP result code if obtained.
ServerReply is used to reply errors but can also be the base for Ok replies, see the unit tests `Response` and ../rapi for examples of use.