httpUtility

package
v0.0.0-...-f374617 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Http2_client http.Client
View Source
var Http_client http.Client

Http_client is a basic default http client. will be updating this default client so that it can support HTTP/2 as well.

Functions

func HttpDelete

func HttpDelete(url string, content_type string, body []byte, opts ...string) (resp *http.Response, err error)

HttpDelete function acts as API for HTTP DELETE request Arguments and description is same as HttpDo except method.

func HttpDo

func HttpDo(method string, url string, content_type string, body []byte, opts ...string) (resp *http.Response, err error)

HttpDo function acts as a API for external use. arguments method can be any of PUT/GET/DELETE/POST url should be string

func HttpGet

func HttpGet(url string, content_type string, body []byte, opts ...string) (resp *http.Response, err error)

HttpGet function acts as API for HTTP GET request Arguments and description is same as HttpDo except method.

func HttpPost

func HttpPost(url string, content_type string, body []byte, opts ...string) (resp *http.Response, err error)

HttpPost function acts as API for HTTP POST request Arguments and description is same as HttpDo except method.

func HttpPut

func HttpPut(url string, content_type string, body []byte, opts ...string) (resp *http.Response, err error)

HttpPut function acts as API for HTTP PUT request Arguments and description is same as HttpDo except method.

func InitializeHttpClient

func InitializeHttpClient()

//// TODO /////////////////////////// This function can be modularized in future to support certificates in that case allow_http and key file path can be taken from configuration file

func ShutDownApp

func ShutDownApp(reason string) (*http.Response, error)

ShutDownApp sends shutdown signal to the app

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL