Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding documentation #3

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,28 @@ import (
)

type Client interface {
// Get sends an HTTP GET request to the specified URL with the given options.
Get(url string, options *Options) (*http.Response, error)
// Post sends an HTTP POST request to the specified URL with the given options.
Post(url string, options *Options) (*http.Response, error)
// Put sends an HTTP PUT request to the specified URL with the given options.
Put(url string, options *Options) (*http.Response, error)
// Patch sends an HTTP PATCH request to the specified URL with the given options.
Patch(url string, options *Options) (*http.Response, error)
// Delete sends an HTTP DELETE request to the specified URL with the given options.
Delete(url string, options *Options) (*http.Response, error)
// Context returns the context associated with the HTTP client.
// This context can be used to control the lifecycle of HTTP requests,
// allowing for cancellation, timeout.
Context() context.Context
}

type client struct {
ctx context.Context
ctx context.Context
client *http.Client
}

func (c *client) Context() context.Context{
func (c *client) Context() context.Context {
return c.ctx
}

Expand Down
Loading