myhttp

package
v0.0.0-6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package myhttp contains an http connection

Package myhttp contains an http connection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMyClient

func GetMyClient() *http.Client

GetMyClient is function to get custom client

func IsJSONArray

func IsJSONArray(body []byte) bool

IsJSONArray is funtion to check json data whether it is array

func IsJSONMap

func IsJSONMap(body []byte) bool

IsJSONMap is funtion to check json data whether it is map

func NewGetRequest

func NewGetRequest(url string) (*http.Request, error)

NewGetRequest is function to create Get request

func NewPostRequest

func NewPostRequest(url string, formData url.Values) (*http.Request, error)

NewPostRequest is function to create Post request

func SetAcceptJSONHeader

func SetAcceptJSONHeader(req *http.Request)

SetAcceptJSONHeader is function to set accept JSON header

func SetTokenHeader

func SetTokenHeader(req *http.Request, accessToken string)

SetTokenHeader is function to set Authorization token

Types

This section is empty.

Jump to

Keyboard shortcuts

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