go-http

module
v0.0.0-...-d3b0170 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT

README

go-http

HTTP Wrapper in golang along with mock

GoDoc Go Report Card

To get the latest package:

go get -u github.com/FenixAra/go-http/http

Usage

package main

import (
	"net/http"

	http_wrap "github.com/FenixAra/go-http/http"
	"github.com/FenixAra/go-util/log"
)

func main() {
	config := log.NewConfig("", "Debug", "Full", "TestApp", "", "", "")
	l := log.New(config)

	cfg := http_wrap.NewConfig()
	cfg.SetRetries(10)
	cfg.SetTimeout(5)
	wrapper := http_wrap.New(cfg, l)

	wrapper.MakeRequest(http.MethodGet, "https://www.google.com", "Google", nil, nil)
}

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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