Skip to content

Commit

Permalink
Update inline docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby authored Dec 13, 2024
1 parent 5e5200f commit 584283c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ func (c *Client) AddHeaders(h map[string][]string) *Client {
return c
}

// SetHeaders sets multiple header fields and their values in the client.
// SetHeaders method sets multiple headers field and its values at one go in the client instance.
// These headers will be applied to all requests created from this client instance. Also it can be
// overridden at request level headers options.
func (c *Client) SetHeaders(h map[string]string) *Client {
c.header.SetHeaders(h)
return c
Expand All @@ -301,6 +303,7 @@ func (c *Client) Param(key string) []string {
}

// AddParam adds a single query parameter and its value to the client.
// These params will be applied to all requests created from this client instance.
func (c *Client) AddParam(key, val string) *Client {
c.params.Add(key, val)
return c
Expand Down
1 change: 1 addition & 0 deletions client/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func (r *Request) Context() context.Context {
}

// SetContext sets the context for the Request, allowing request cancellation if ctx is done.
// See https://blog.golang.org/context article and the "context" package documentation.
func (r *Request) SetContext(ctx context.Context) *Request {
r.ctx = ctx
return r
Expand Down

0 comments on commit 584283c

Please sign in to comment.