https://github.com/azer/strict-request
Send strict HTTP Requests with Go
https://github.com/azer/strict-request
Last synced: 11 months ago
JSON representation
Send strict HTTP Requests with Go
- Host: GitHub
- URL: https://github.com/azer/strict-request
- Owner: azer
- Created: 2018-07-19T12:14:31.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T08:26:21.000Z (almost 8 years ago)
- Last Synced: 2024-11-07T04:39:59.900Z (over 1 year ago)
- Language: Go
- Homepage: https://godoc.org/github.com/kozmos/strict-request
- Size: 4.88 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strict-request
Send HTTP requests with strict options, such as;
* Timeout
* Maximum content size (first given MBs)
* No redirects (Can be enabled back with `AllowRedirects` option)
## Example
```go
package main
import (
"github.com/kozmos/strict-request"
)
func main () {
resp, err := strictrequest.Get(testServer.URL, strictrequest.Options{
TimeoutMs: 1000, // 1000 milliseconds
MaxSizeMb: 0.5, // 500kb
})
if err != nil {
panic(err)
}
}
```
Check out tests for more details and documentation.