Simple HTTP package that wraps net/http

Related tags

HTTP Clients go-http
Overview

Simple HTTP package that wraps net/http

Usage

See the examples directory for more examples.

package main

import (
	"context"
	"fmt"
	"io"
	"os"

	httpx "github.com/heyden/go-http/http"
)

func main() {
	resp, err := httpx.Get(context.TODO(), "https://google.com", nil, nil)
	if err != nil {
		fmt.Printf("%v\n", err)
		os.Exit(1)
	}
	body, err := io.ReadAll(resp.Body)
	if err != nil {
		fmt.Printf("%v\n", err)
		os.Exit(1)
	}
	fmt.Println(string(body))
}
You might also like...
Simple web-hook based receiver executing things via HTTP request

Updater is a simple web-hook-based receiver executing things via HTTP requests and invoking remote updates without exposing any sensitive info, like ssh keys, passwords, etc.

a simple wrapper around resty to report HTTP calls metrics to prometheus

restyprom a simple wrapper around resty to report HTTP calls metrics to prometheus If you're using resty and want to have metrics of your HTTP calls,

Simple http client

www Simple http client for golang with user-friendly interface. Features Chainable API Direct file upload Timeout Cookie GZIP Charset detection Cleane

This is repository for Simple HTTP GET golang app that counts standard deviation from random.org integers

Simple Get Deviation App This is repository for Simple HTTP GET golang app that counts standard deviation from random.org integers IMPORTANT: Because

tasq is a simple HTTP-based task queue. Each task is represented as a string

tasq tasq is a simple HTTP-based task queue. Each task is represented as a string (it could be anything). Tasks are pushed to the queue via an HTTP en

This is a simple single-host reverse proxy that intercept and save HTTP requests and responses
This is a simple single-host reverse proxy that intercept and save HTTP requests and responses

HTTP Telescope Debug HTTP requests using a reverse proxy. Description This is a simple single-host reverse proxy that intercept and save HTTP requests

goql is a GraphQL client package written in Go. with built-in two-way marshaling support via struct tags.

goql is a GraphQL client package written in Go. with built-in two-way marshaling support via struct tags.

Full-featured, plugin-driven, extensible HTTP client toolkit for Go

gentleman Full-featured, plugin-driven, middleware-oriented toolkit to easily create rich, versatile and composable HTTP clients in Go. gentleman embr

An enhanced http client for Golang
An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev 🔗 This package provides you a http client package for your http requests. Y

Owner
Kris
Kris
fhttp is a fork of net/http that provides an array of features pertaining to the fingerprint of the golang http client.

fhttp The f stands for flex. fhttp is a fork of net/http that provides an array of features pertaining to the fingerprint of the golang http client. T

Flexagon 61 Jan 1, 2023
A net.http.Handler similar to FileServer that serves gzipped content

net.http.handler.gzip: a FileServer that serves gzipped content. Usage: import "net/http/handler/gzip" base := "/path/to/website/static/files" http

Joao da Silva 15 Mar 14, 2022
Speak HTTP like a local. (the simple, intuitive HTTP console, golang version)

http-gonsole This is the Go port of the http-console. Speak HTTP like a local Talking to an HTTP server with curl can be fun, but most of the time it'

mattn 65 Jul 14, 2021
Http-conection - A simple example of how to establish a HTTP connection using Golang

A simple example of how to establish a HTTP connection using Golang

Jonathan Gonzaga 0 Feb 1, 2022
Replacement of ApacheBench(ab), support for transactional requests, support for command line and package references to HTTP stress testing tool.

stress stress is an HTTP stress testing tool. Through this tool, you can do a stress test on the HTTP service and get detailed test results. It is ins

Wenjia Xiong 37 Aug 23, 2022
fastcache is an HTTP response caching package that plugs into fastglue that simplifies

fastcache fastcache is a simple response caching package that plugs into fastglue. The Cached() middleware can be wrapped around fastglue GET handlers

Zerodha Technology 17 Apr 5, 2022
retryablehttp package provides a familiar HTTP client interface with automatic retries and exponential backoff.

retryablehttp package provides a familiar HTTP client interface with automatic retries and exponential backoff.

HashiCorp 1.4k Jan 4, 2023
Http client call for golang http api calls

httpclient-call-go This library is used to make http calls to different API services Install Package go get

pzenteno 16 Oct 7, 2022
NATS HTTP Round Tripper - This is a Golang http.RoundTripper that uses NATS as a transport.

This is a Golang http.RoundTripper that uses NATS as a transport. Included is a http.RoundTripper for clients, a server that uses normal HTTP Handlers and any existing http handler mux and a Caddy Server transport.

R.I.Pienaar 81 Dec 6, 2022
Simple HTTP and REST client library for Go

Resty Simple HTTP and REST client library for Go (inspired by Ruby rest-client) Features section describes in detail about Resty capabilities Resty Co

Go Resty 7.1k Jan 1, 2023