Skip to content
/ httprs Public
forked from jfbus/httprs

A ReadSeeker for http.Response.Body

License

Notifications You must be signed in to change notification settings

i4n-co/httprs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httprs

A ReadSeeker for http.Response.Body CircleCI

Usage

import "github.com/jfbus/httprs"

resp, err := http.Get(url)

rs := httprs.NewHttpReadSeeker(resp)
defer rs.Close()
io.ReadFull(rs, buf) // reads the first bytes from the response
rs.Seek(1024, io.SeekStart) // moves the position
io.ReadFull(rs, buf) // does an additional range request and reads the first bytes from the second response

if you use a specific http.Client :

rs := httprs.NewHttpReadSeeker(resp, client)

Doc

See https://pkg.go.dev/github.com/jfbus/httprs

LICENSE

MIT - See LICENSE

About

A ReadSeeker for http.Response.Body

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%