Skip to content

Simple wire logging utils targeted to http.Client

Notifications You must be signed in to change notification settings

jpfielding/gowirelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

gowirelog

Simple wire logging utils targeted to http.Client

package main

import (
  "net/http"

  "github.com/jpfielding/gowirelog/wirelog"
}

func main() {
	transport := wirelog.NewHTTPTransport()
	logname := "/tmp/logs/http.log"
	closer, err := wirelog.LogToFile(transport, logname, true, true)
  	defer closer.Close()
	client := &http.Client{
		Transport: transport,
	}
	client.Jar, _ = cookiejar.New(nil)
	login, _ := url.Parse(login)
	req, _ := http.NewRequest("GET", login.String(), nil)
	resp, _ := ctxhttp.Do(ctx, client, req1)
	defer resp.Body.Close()
}

About

Simple wire logging utils targeted to http.Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages