http2

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: AGPL-3.0 Imports: 5 Imported by: 3

Documentation

Overview

Package http2 is the same as the standard http lib with HTTP2 client support

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = http.Client{
	Transport: &http2.Transport{
		DialTLSContext: dns.DialTLSContextWithConfig,
	},
}

DefaultClient is the default HTTP2 client that supports HTTP/2 and DNS resolution

Functions

func Get

func Get(url string) (resp *http.Response, err error)

Get sends an HTTP GET request to the specified URL using the default HTTP2 client

func Head(url string) (resp *http.Response, err error)

Head sends an HTTP HEAD request to the specified URL using the default HTTP2 client

func Post

func Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)

Post sends an HTTP POST request to the specified URL with the given content type and body using the default HTTP2 client

func PostForm

func PostForm(url string, data url.Values) (resp *http.Response, err error)

PostForm sends an HTTP POST request with form data to the specified URL using the default HTTP2 client

Types

This section is empty.

Jump to

Keyboard shortcuts

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