Skip to content

Commit

Permalink
2023.1.9 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kings1990 committed Aug 23, 2023
1 parent 0926a81 commit c6a9d9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/en/guide/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Note that the logic of obtaining the token must be handled in conjunction with t

It needs to be written like this

`String token = JSON.parseObject(myResponse.body()).getJsonObject("data").getString("token")`
`String token = JSON.parseObject(myResponse.body()).getJSONObject("data").getString("token")`

```groovy
import cn.hutool.core.util.CharsetUtil
Expand Down Expand Up @@ -278,7 +278,7 @@ import com.alibaba.fastjson.JSON
HttpRequest myRequest = HttpUtil.createPost("http://localhost:8081/api/v1.0/login")
HttpResponse myResponse = myRequest.execute()
if(myResponse.isOk()){
String token = JSON.parseObject(myResponse.body()).getJsonObject("data").getString("token")
String token = JSON.parseObject(myResponse.body()).getJSONObject("data").getString("token")
rfr.environment.put("token",token)
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ request.header("sign",sign)
```

则需要这么写
`JSON.parseObject(myResponse.body()).getJsonObject("data").getString("token")`
`JSON.parseObject(myResponse.body()).getJSONObject("data").getString("token")`

```groovy
import cn.hutool.core.util.CharsetUtil
Expand Down Expand Up @@ -284,7 +284,7 @@ import com.alibaba.fastjson.JSON
HttpRequest myRequest = HttpUtil.createPost("http://localhost:8081/api/v1.0/login")
HttpResponse myResponse = myRequest.execute()
if(myResponse.isOk()){
String token = JSON.parseObject(myResponse.body()).getJsonObject("data").getString("token")
String token = JSON.parseObject(myResponse.body()).getJSONObject("data").getString("token")
rfr.environment.put("token",token)
}
```
Expand Down

0 comments on commit c6a9d9b

Please sign in to comment.