base_http_client

package
v0.0.0-...-50d7d3f Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHttpClient

type BaseHttpClient interface {
	SetReturnCURL(isReturned bool)
	SetDefaultRetry(defaultRetry int)
	SetDefaultDelay(defaultDelay time.Duration)
	SendRequest(ctx context.Context, method string, url string, options, payload interface{}, headers map[string]string) (*HttpResponse, error)
	SendRequestWithAttempt(ctx context.Context, method string, url string, options, payload interface{}, headers map[string]string) (*HttpResponse, error)
}

func NewBaseHttpClient

func NewBaseHttpClient(httpClient *http.Client) BaseHttpClient

type HttpResponse

type HttpResponse struct {
	Request    *http.Request `json:"request"`
	StatusCode int           `json:"statusCode"`
	Body       []byte        `json:"body"`
}

Jump to

Keyboard shortcuts

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