# Functions

BuildOkResponse builds simple "ok" response.
BuildOkResponseWithData builds response with status "ok" and data.
BuildResponse builds response for RestAPI request.
Send sends HTTP response with a provided statusCode data can be either string or map[string]interface{} if data is string it will send response like this: {"status": data} which is helpful for explaining error to the client Returned error value is based on error returned from json.Encoder.
SendAccepted returns response with status Accepted 202.
SendBadRequest returns error response with status Bad Request 400.
SendCreated returns response with status Created 201.
SendForbidden returns response with status Forbidden 403.
SendInternalServerError returns response with status Internal Server Error 500.
SendNoContent returns error response with status SendNoContent 204.
SendNotFound returns response with status Not Found 404.
SendOK returns JSON response with status OK 200.
SendServiceUnavailable returns response with status Service Unavailable 503.
SendUnauthorized returns error response for unauthorized access with status Unauthorized 401.