Sha256: d348ef19cba6704bac5e1bb7429ca6c304f5d52ab2c9d8b9c3213b66bc98d2d6
Contents?: true
Size: 456 Bytes
Versions: 36
Compression:
Stored size: 456 Bytes
Contents
package <%= package %> import ( "net/http" ) type BasicAuth struct { Username string Password string } func (auth *BasicAuth) Authenticate(request *http.Request) { request.SetBasicAuth(auth.Username, auth.Password) } // SetBasicAuthentication enables HTTP basic auth on the client func (client *Client) SetBasicAuthentication(username string, password string) { client.Authentication = &BasicAuth{ Username: username, Password: password, } }
Version data entries
36 entries across 36 versions & 1 rubygems