/chttp

Cooked HTTP — a standard golang HTTP Client with user-defined cookies, and a customised transport.

Primary LanguageGoThe UnlicenseUnlicense

chttp

Go Reference

Cooked HTTP — a standard golang HTTP Client wrapper that adds a cookie jar with user-defined cookies, and a customised transport.

Simple usage:

import "github.com/rusq/chttp"

func getSomething() error {
	cookies := readFromFile()
	cl := chttp.New("https://slack.com", cookies)

	resp, err := cl.Get("url") // will execute with the cookies
	if err != nil {
		return err
	}
	// do something with resp
	return nil
}

See package documentation if you'd like to read more.