Categorygithub.com/teran/go-http-client
modulepackage
0.1.1
Repository: https://github.com/teran/go-http-client.git
Documentation: pkg.go.dev

# README

go-http-client

Go Go Report Card PkgGoDev

HTTP Client for Go to ease interaction with web services, especially APIs

Usage example

package main

import (
	"fmt"

	"github.com/pkg/errors"
	ghc "github.com/teran/go-http-client"
)

// FIXME: Change this to your test JSON URL
const testURL = "http://........."

func main() {
	resp := map[string]string{}
	errResp := map[string]string{}
	statusCode, err := ghc.New().
		Base(testURL).
		Get("/json").
		DoJSON(s.ctx, nil, &resp, &errResp)
	if err != nil {
		panic(errors.Wrap(err, fmt.Sprintf("%#v", errResp)))
	}

	fmt.Printf("%#v", resp)
}

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author