httputil

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package httputil provides utilities for HTTP requests.

Index

Constants

View Source
const (
	RequestHeaderContentType = "Content-Type"
	RequestHeaderJSON        = "application/json"
	RequestHeaderYAML        = "application/yaml"
	RequestHeaderJSONIndent  = "json-indent"

	RequestHeaderAcceptEncoding = "Accept-Encoding"
	RequestHeaderEncodingGzip   = "gzip"
)

Variables

This section is empty.

Functions

func CreateURL

func CreateURL(scheme string, endpoint string, path string) (string, error)

CreateURL creates a URL from a scheme, host, and path. If the scheme is empty, it will be inferred from the endpoint. If the endpoint does not have a scheme, it will default to "http". If the endpoint does not have a host, it will default to "localhost".

Types

This section is empty.

Jump to

Keyboard shortcuts

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