Skip to content

lochv/httpclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpclient


Example:

package main

import (
	"fmt"
	"github.com/lochv/httpclient"
	"time"
)

func main() {
	c := httpclient.Client{
		Session:          false, // use session
		Following:        false, //follow redirects
		DisableUrlEncode: true,
		Analyze:          false,
		Retry:            0, //retry if request fail
		ReadTimeout:      30 * time.Second,
		MaxBodySize:      0, // bytes
	}
	r := c.Get("https://golang.org/#/api/liferay", nil)
	fmt.Println(r.StatusCode)

	c = httpclient.Client{
		Session:          false, // use session
		Following:        false, //follow redirects
		DisableUrlEncode: false,
		Analyze:          false,
		Retry:            0, //retry if request fail
		ReadTimeout:      30 * time.Second,
		MaxBodySize:      0, // bytes
	}
	r = c.Get("https://golang.org/#/api/liferay", nil)
	fmt.Println(r.StatusCode)
}

About

Simple golang http client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages