httpclient

package
v0.0.0-...-fd95499 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestClients

func TestClients(t *testing.T) []*model.Client

func TestRequest

func TestRequest(t *testing.T) ([]byte, []*requestGetNamesByID)

func TestResponseGetNamesById

func TestResponseGetNamesById(t *testing.T) ([]byte, []*responseGetNamesByID)

TestResponseGetNamesById test response from GetNamesById

func TestSearchingClientsByID

func TestSearchingClientsByID(t *testing.T) ([]byte, []*model.Client)

TestClients test cliets

Types

type HTTPClient

type HTTPClient struct {
	// contains filtered or unexported fields
}

HTTPClient ...

func New

func New(baseURL, userAgent string, client *http.Client) (*HTTPClient, error)

New return new http client

func TestNewHTTPClient

func TestNewHTTPClient(t *testing.T) *HTTPClient

func (*HTTPClient) Do

func (h *HTTPClient) Do(data []byte, url string, hrole string) ([]byte, error)

Do send request

func (*HTTPClient) GetNamesByID

func (h *HTTPClient) GetNamesByID(c []*model.Client, employeeID, userRole string) ([]*model.Client, error)

GetNamesByID getting client names by identifiers

Jump to

Keyboard shortcuts

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