Skip to content

Commit

Permalink
Add docs from gofiber/fiber@3ab3d15
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 15, 2023
1 parent d381170 commit 7330a0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/core/api/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ agent.BodyStream(strings.NewReader("body=stream"), -1)

### JSON

JSON sends a JSON request by setting the Content-Type header to `application/json`.
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`.

```go title="Signature"
func (a *Agent) JSON(v interface{}) *Agent
func (a *Agent) JSON(v interface{}, ctype ...string) *Agent
```

```go title="Example"
Expand Down
2 changes: 1 addition & 1 deletion docs/core/api/ctx.md
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ app.Get("/", func(c *fiber.Ctx) error {
Converts any **interface** or **string** to JSON using the [encoding/json](https://pkg.go.dev/encoding/json) package.
:::info
JSON also sets the content header to the `ctype` parameter. If no `ctype` is passed in, the header is set to **application/json**.
JSON also sets the content header to the `ctype` parameter. If no `ctype` is passed in, the header is set to `application/json`.
:::
```go title="Signature"
Expand Down

0 comments on commit 7330a0b

Please sign in to comment.