
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/mreiferson/go-httpclient
requires Go 1.1+ as of v0.4.0
the API has been completely re-written for Go 1.1 (for a Go
1.0.x compatible release see 1adef50)
Provides an HTTP Transport that implements the RoundTripper
interface and
can be used as a built in replacement for the standard library's, providing:
This is a thin wrapper around http.Transport
that sets dial timeouts and uses
Go's internal timer scheduler to call the Go 1.1+ CancelRequest()
API.
transport := &httpclient.Transport{
ConnectTimeout: 1*time.Second,
RequestTimeout: 10*time.Second,
ResponseHeaderTimeout: 5*time.Second,
}
defer transport.Close()
client := &http.Client{Transport: transport}
req, _ := http.NewRequest("GET", "http://127.0.0.1/test", nil)
resp, err := client.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
Note: you will want to re-use a single client object rather than creating one for each request, otherwise you will end up leaking connections.
For API docs see godoc.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.