package
0.3.0
Repository: https://github.com/frame-go/framego.git
Documentation: pkg.go.dev

# Functions

GetClient creates a `Client` based on `opts` and returns to caller.
GetJSON send GET request with data in JSON format, using `DefaultClient`.
NewDefaultClient initializes a new DefaultClient.
NewDefaultHTTPMockClient creates a http client for testing.
PostForm send POST request with data in Form format, using `DefaultClient`.
PostJSON send POST request with data in JSON format, using `DefaultClient`.
RawClientType sets `Options.ClientType`.
RequestJSON send http request with JSON response, support both GET and POST, different body format and headers, using `DefaultClient`.
SetClient sets http client.
Timeout sets `Options.Timeout`.

# Constants

client type.
client type.
request data formats.
http methods.
request data formats.
request data formats.
POST
http methods.
request data formats.
request data formats.

# Structs

DefaultClient is the client to handle the various HTTP request, with net/http.Client as internal client.
DefaultMockClient read json content from mock file and unmarshal it to response.
FastHTTPClient is the client to handle the various HTTP request, with net/fasthttp.Client as internal client.
Options are options to create a client.

# Interfaces

Client is the http client standard interface.

# Type aliases

DataMap is a map of key to any data.
GetMockFileNameFunc returns a file name, of which contains mock data for test.
Method represents http method in string.
Option is modifier to update Options.