Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CORS-related constants. CorsAllowOrigin = "Access-Control-Allow-Origin" OriginAll = "*" CorsAllowMethods = "Access-Control-Allow-Methods" ReqOptions = "OPTIONS" CorsAllowHeaders = "Access-Control-Allow-Headers" CorsHeaders = "Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization" )
Variables ¶
This section is empty.
Functions ¶
func CreateTLSHTTPClient ¶
CreateTLSHTTPClient provides a basic http client prepared with a trusted CA cert
func EnableCORS ¶
func EnableCORS(resp http.ResponseWriter, req *http.Request) bool
EnableCORS Allows Tenscan and WalletExtension APIs to serve other web apps via CORS.
func ExecuteHTTPReq ¶
ExecuteHTTPReq executes an HTTP request: * returns an error if request fails or if the response code was outside the range 200-299 * returns response body as bytes if there was a response body
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.