httpclient

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: AGPL-3.0, AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP_CLIENT_DELETE = "DELETE"
View Source
const HTTP_CLIENT_GET = "GET"
View Source
const HTTP_CLIENT_POST = "POST"
View Source
const HTTP_CLIENT_PUT = "PUT"

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	URL                string           // URL
	FullURL            string           // URL полный с аргументами
	Args               url.Values       // Аргументы к URL строке
	UserID             string           // UserID для аутентификации
	UserPwd            string           // UserPwd для аутентификации
	CallMethod         string           // HTTP метод для вызова
	CallTimeout        time.Duration    // полный Timeout вызова
	ContentType        string           // тип контента в ответе
	InsecureSkipVerify bool             // игнорировать проверку сертификатов
	ReCallRepeat       int              // количество попыток вызова при недоступности сервиса - 0 не ограничено
	ReCallWaitTimeout  time.Duration    // Timeout между вызовами при недоступности сервиса
	HTTPLogger         *_httplog.Logger // сервис логирования HTTP
}

Call represent а parameters for client requests

func (*Call) Process

func (c *Call) Process(ctx context.Context, header Header, requestBody []byte) (statusCode int, responseBuf []byte, respHeader http.Header, err error)

Process - represent client common task in process outgoing HTTP request

type Header map[string]string

Header represent temporary HTTP header for save

Jump to

Keyboard shortcuts

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