Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei authored Apr 15, 2024
1 parent d579e54 commit 72ad5b0
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions ytest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ match { // assert resp.body.id == id
host <host> <real>
```

The Host directive allows you to use an abstract domain name (which does not necessarily exist) to represent a service. For examples:
The Host directive allows you to use an abstract domain name (which does not necessarily exist) to represent a service.

For examples:

```go
host "https://foo.com", "http://127.0.0.1:8080"
Expand All @@ -153,17 +155,18 @@ host "https://foo.com", ${FOO_HOST}
// Let env FOO_HOST point to the test environment or production environment
```

## auth

## req/post/get/delete/put

TODO


## req/post/get/delete/put
## header

TODO


## header
## ret

TODO

Expand All @@ -173,7 +176,30 @@ TODO
TODO


## ret
## auth

TODO
```go
auth <auth>
```

Auth sets an Authorization for a request. For example:

```go
auth qiniu("<AccessKey>", "<SecretKey>")
```

Authorization information can be shared between different requests:

```go
testauth := qiniu("<AccessKey>", "<SecretKey>")

post "https://foo.com/bar"
auth testauth
ret 200

...

get "https://foo.com/bar"
auth testauth
ret 200
```

0 comments on commit 72ad5b0

Please sign in to comment.