Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJson = "application/json" ContentTypeUrlEncoded = "application/x-www-form-urlencoded" ContentTypeOgg = "audio/ogg;codecs=opus" )
Variables ¶
View Source
var ( Err401StatusCode = errors.New("unauthorized - 401") ErrWrongStatusCode = errors.New("wrong status code") ErrCantCreateRequest = errors.New("can't create request") ErrAuthInfoNotSpecified = errors.New("auth info wasn't specified") ErrCantUpdateToken = errors.New("can't update token") ErrCantCreateClient = errors.New("can't create client") )
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
func NewHTTPClient ¶
func NewHTTPClient(host, basePath string) *HTTPClient
func (*HTTPClient) CreateRequest ¶
func (hc *HTTPClient) CreateRequest(method string, url string, header http.Header, body io.Reader, query url.Values) (*http.Request, error)
CreateRequest return http.Request with given parameters. If you don't need some of the parameters then give nil.
func (*HTTPClient) GetFullUrl ¶
func (hc *HTTPClient) GetFullUrl() *url.URL
func (*HTTPClient) GetUlrWithMethods ¶
func (hc *HTTPClient) GetUlrWithMethods(method string) *url.URL
Click to show internal directories.
Click to hide internal directories.