Skip to content

Commit 4b3e4ab

Browse files
committed
更新readme
1 parent 4ac995f commit 4b3e4ab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

WebApiClientCore.Extensions.JsonRpc/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ WebApiClientCore的JsonRpc调用扩展
99
public interface IUserApi
1010
{
1111
[JsonRpcMethod("add")]
12-
ITask<JsonRpcResult<User>> AddAsync([JsonRpcParam] string name, [JsonRpcParam] int age);
12+
ITask<JsonRpcResult<User>> AddAsync([JsonRpcParam] string name, [JsonRpcParam] int age, CancellationToken token = default);
1313
}
14+
```
15+
16+
```
17+
POST /jsonrpc HTTP/1.1
18+
Host: localhost:5000
19+
User-Agent: WebApiClientCore/1.0.6.0
20+
Accept: application/json; q=0.01, application/xml; q=0.01
21+
Content-Type: application/json-rpc
22+
23+
{"jsonrpc":"2.0","method":"add","params":["laojiu",18],"id":1}
1424
```

0 commit comments

Comments
 (0)