httpclient

package
v0.0.0-...-d09923a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: LGPL-2.1 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSubModule

func InitSubModule() error

Types

type HttpCaller

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

func NewHttpCaller

func NewHttpCaller(baseUrl string, client *client.HttpClient, logger logging.LoggerService) *HttpCaller

func (*HttpCaller) Do

func (this *HttpCaller) Do(ctx context.Context, req *Request) (*Response, error)

func (*HttpCaller) LogRequest

func (this *HttpCaller) LogRequest(ctx context.Context, req *Request, res *Response)

type Request

type Request struct {
	Method  string      `json:"method"`
	Path    string      `json:"path"`
	Headers http.Header `json:"header"`
	Query   url.Values  `json:"query"`
	Body    any         `json:"body"`
}

type Response

type Response struct {
	StatusCode int         `json:"status_code"`
	Headers    http.Header `json:"headers"`
	Body       []byte      `json:"body"`
}

Directories

Path Synopsis
Package httpclienttest holds test helpers for code that calls out through the shared HTTP client: an in-memory tracer, a traced request context, and a server that records headers.
Package httpclienttest holds test helpers for code that calls out through the shared HTTP client: an in-memory tracer, a traced request context, and a server that records headers.

Jump to

Keyboard shortcuts

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