http

package
v1.34.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package http provides a net/http and a fetch implementation of http requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client = http.Client

Client is the http client type (struct).

var DefaultClient *Client = http.DefaultClient

DefaultClient is the default client.

type Request

type Request = http.Request

Request is the http request type (struct).

func NewRequest

func NewRequest(method, url string, body io.Reader) (*Request, error)

NewRequest constructs a new http request.

func NewRequestWithContext

func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*Request, error)

NewRequestWithContext constructs a new http request with a context.

type Response

type Response = http.Response

Response is the http response type.

func DoRequest

func DoRequest(le *logrus.Entry, client *Client, req *Request, verbose bool) (*Response, error)

DoRequest performs a request with logging.

If verbose=true, logs successful cases as well as errors. le can be nil to disable logging

Jump to

Keyboard shortcuts

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