Skip to content

Commit

Permalink
apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed May 13, 2024
1 parent dc7d3d9 commit 92efa57
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 99 deletions.
1 change: 0 additions & 1 deletion docs/client/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ func main() {
```
</details>


### Response

```go
Expand Down
22 changes: 11 additions & 11 deletions docs/client/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (r *Request) Context() context.Context
## SetContext

SetContext sets the context.Context for current Request. It allows interruption of the request execution if the ctx.Done() channel is closed.
See https://blog.golang.org/context article and the "context" package documentation.
See [the article](https://blog.golang.org/context) and the [context](https://pkg.go.dev/context) package documentation.

```go title="Signature"
func (r *Request) SetContext(ctx context.Context) *Request
Expand Down Expand Up @@ -375,7 +375,7 @@ func (r *Request) UserAgent() string
## SetUserAgent

SetUserAgent method sets user agent in request.
It will override user agent which has been set in client instance.
It will override the user agent which has been set in the client instance.

```go title="Signature"
func (r *Request) SetUserAgent(ua string) *Request
Expand Down Expand Up @@ -908,7 +908,7 @@ func (r *Request) SetMaxRedirects(count int) *Request

## Get

Get sends the GET request.
Get sends the GET request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -917,7 +917,7 @@ func (r *Request) Get(url string) (*Response, error)

## Post

Post sends the POST request.
Post sends the POST request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -926,7 +926,7 @@ func (r *Request) Post(url string) (*Response, error)

## Head

Head sends the HEAD request.
Head sends the HEAD request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -935,7 +935,7 @@ func (r *Request) Head(url string) (*Response, error)

## Put

Put sends the PUT request.
Put sends the PUT request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -944,7 +944,7 @@ func (r *Request) Put(url string) (*Response, error)

## Delete

Delete sends the DELETE request.
Delete sends the DELETE request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -953,7 +953,7 @@ func (r *Request) Delete(url string) (*Response, error)

## Options

Options sends the OPTIONS request.
Options sends the OPTIONS request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -962,7 +962,7 @@ func (r *Request) Options(url string) (*Response, error)

## Patch

Patch sends the PATCH request.
Patch sends the PATCH request.
It sets the URL and HTTP method, and then it sends the request.

```go title="Signature"
Expand All @@ -971,7 +971,7 @@ func (r *Request) Patch(url string) (*Response, error)

## Custom

Custom sends a request with custom HTTP method.
Custom sends a request with custom HTTP method.
It sets the URL and HTTP method, and then it sends the request.
You can use Custom to send requests with methods like TRACE, CONNECT.

Expand Down Expand Up @@ -1334,7 +1334,7 @@ func (f *File) SetPath(p string)

## SetReader

SetReader method can receive a io.ReadCloser which will be closed in parserBody hook.
SetReader method can receive an io.ReadCloser which will be closed in parserBody hook.

```go title="Signature"
func (f *File) SetReader(r io.ReadCloser)
Expand Down
2 changes: 1 addition & 1 deletion docs/client/response.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *Response) Reset()

## Close

Close method will release Request object and Response object, after call Close please don't use these object.
Close method will release the Request and Response objects; after calling Close, please do not use these objects.

```go title="Signature"
func (r *Response) Close()
Expand Down

0 comments on commit 92efa57

Please sign in to comment.