Skip to content

Commit 5b1edee

Browse files
committed
update v2 with last release
1 parent 7330a0b commit 5b1edee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

versioned_docs/version-v2.x/api/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ agent.BodyStream(strings.NewReader("body=stream"), -1)
268268

269269
### JSON
270270

271-
JSON sends a JSON request by setting the Content-Type header to `application/json`.
271+
JSON sends a JSON request by setting the Content-Type header to the `ctype` parameter. If no `ctype` is passed in, the header is set to `application/json`.
272272

273273
```go title="Signature"
274-
func (a *Agent) JSON(v interface{}) *Agent
274+
func (a *Agent) JSON(v interface{}, ctype ...string) *Agent
275275
```
276276

277277
```go title="Example"

versioned_docs/version-v2.x/api/ctx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ app.Get("/", func(c *fiber.Ctx) error {
797797
Converts any **interface** or **string** to JSON using the [encoding/json](https://pkg.go.dev/encoding/json) package.
798798
799799
:::info
800-
JSON also sets the content header to the `ctype` parameter. If no `ctype` is passed in, the header is set to **application/json**.
800+
JSON also sets the content header to the `ctype` parameter. If no `ctype` is passed in, the header is set to `application/json`.
801801
:::
802802
803803
```go title="Signature"

0 commit comments

Comments
 (0)