Skip to content

Commit

Permalink
docs(readme): json usage
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni committed Apr 15, 2024
1 parent 2e16a07 commit b97e0cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ yarn add @lylajs/web # for yarn

## Usage

> [!IMPORTANT]
> Lyla use **`json`** field to config request data, not `body`! Also, there's **no** `data` field in lyla.
>
> `body` field is used to set raw body of the request such as `string` or `Blob`, which is not a common case.
```ts
import { createLyla } from '@lylajs/web'

Expand Down
5 changes: 5 additions & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ yarn add @lylajs/web # 使用 yarn 安装

## 使用

> [!IMPORTANT]
> lyla 使用 **`json`** 字段来配置请求数据,而不是 `body`!此外,lyla 中**没有** `data` 字段。
>
> `body` 字段用于设置请求的原始主体,例如 `string``Blob`,这不是常见的情况。
```ts
import { createLyla } from '@lylajs/web'

Expand Down

0 comments on commit b97e0cc

Please sign in to comment.