/requestfy

A library to facilitate creation of HTTP requests in GO

Primary LanguageGoMIT LicenseMIT

requestfy

A library to facilitate the creation of http requests

Installation

Use go get command to retrieve the package (Go ^1.19 is required):

go get -u github.com/RafaelYon/requestfy

Quick Start

  1. Import it in your code:
import "github.com/RafaelYon/requestfy"
  1. Set up a HTTP Client:
client := requestfy.NewClient(
    requestfy.ConfigDefault(),
    requestfy.ConfigBaseURL("https://swapi.dev/api/")
)
  1. Make a request:
res, err := client.Request().Get("people/1/")