http

package
v2.13.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 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

Overview

Package http provides utilities for creating HTTP requests with Either-based error handling.

Index

Constants

This section is empty.

Variables

View Source
var (
	// PostRequest creates a POST HTTP request with a body.
	// Usage: PostRequest(url)(body) returns Result[*http.Request]
	//
	// Example:
	//
	//	request := http.PostRequest("https://api.example.com/data")([]byte(`{"key":"value"}`))
	PostRequest = http.PostRequest

	// PutRequest creates a PUT HTTP request with a body.
	// Usage: PutRequest(url)(body) returns Result[*http.Request]
	PutRequest = http.PutRequest

	// GetRequest creates a GET HTTP request without a body.
	// Usage: GetRequest(url) returns Result[*http.Request]
	//
	// Example:
	//
	//	request := http.GetRequest("https://api.example.com/data")
	GetRequest = http.GetRequest

	// DeleteRequest creates a DELETE HTTP request without a body.
	// Usage: DeleteRequest(url) returns Result[*http.Request]
	DeleteRequest = http.DeleteRequest

	// OptionsRequest creates an OPTIONS HTTP request without a body.
	// Usage: OptionsRequest(url) returns Result[*http.Request]
	OptionsRequest = http.OptionsRequest

	// HeadRequest creates a HEAD HTTP request without a body.
	// Usage: HeadRequest(url) returns Result[*http.Request]
	HeadRequest = http.HeadRequest
)

Functions

This section is empty.

Types

type Result

type Result[T any] = result.Result[T]

Jump to

Keyboard shortcuts

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