|
1 | | -## WebApiClient |
2 | | -### 1 Nuget包 |
3 | | - |
4 | | -> WebApiClient.JIT |
5 | | -
|
6 | | - PM> install-package WebApiClient.JIT |
7 | | -* 不适用于不支持JIT技术的平台(IOS、UWP); |
8 | | -* Http接口声明要求为public; |
9 | | - |
10 | | - |
11 | | -> WebApiClient.AOT |
12 | | -
|
13 | | - PM> install-package WebApiClient.AOT |
14 | | -* 适用于不支持JIT技术的平台(IOS、UWP); |
15 | | -* Http接口声明不要求为public,可以嵌套在类里面; |
| 1 | +## WebApiClient |
| 2 | +一款声明式的http客户端库,只需要定义c#接口并修饰相关特性,即可异步调用远程http接口。 |
16 | 3 |
|
| 4 | +### 1 Nuget包 |
| 5 | +| 包名 | 描述 | Nuget | |
| 6 | +---|---|--| |
| 7 | +| WebApiClient.JIT | 适用于非AOT编译的所有平台,稳定性好 | [](https://www.nuget.org/packages/WebApiClient.JIT) | |
| 8 | +| WebApiClient.AOT | 适用于所有平台,包括IOS和UWP,复杂依赖项目可能编译不通过 | [](https://www.nuget.org/packages/WebApiClient.AOT) | |
17 | 9 |
|
18 | 10 | ### 2. Http请求 |
19 | 11 | > 接口的声明 |
@@ -51,26 +43,15 @@ var api = HttpApi.Resolve<IUserApi>(); |
51 | 43 | var user = new UserInfo { Account = "laojiu", Password = "123456" }; |
52 | 44 | var user1 = await api.GetAsync("laojiu"); |
53 | 45 | var state = await api.AddAsync(user); |
54 | | -``` |
55 | | - |
56 | | -#### 3. Api变化 |
57 | | -> 相对于[v0.3.6](https://github.com/dotnetcore/WebApiClient/tree/v0.3.6)或以前版本,Api有如下变化 |
58 | | -
|
59 | | -* ~~HttpApiClient.Create()~~ -> HttpApi.Create() |
60 | | -* ~~HttpApiFactory.Add()~~ -> HttpApi.Register() |
61 | | -* ~~HttpApiFactory.Create()~~ -> HttpApi.Resolve() |
62 | | -* ~~Timeout~~ |
63 | | -* ~~UrlAttribute~~ |
64 | | -* ~~DebugAttribute~~ |
| 46 | +``` |
65 | 47 |
|
66 | | -#### 4. Wiki文档 |
| 48 | +#### 3. Wiki文档 |
67 | 49 | 1. [WebApiClient基础](https://github.com/dotnetcore/WebApiClient/wiki/WebApiClient%E5%9F%BA%E7%A1%80) |
68 | 50 | 2. [WebApiClient进阶](https://github.com/dotnetcore/WebApiClient/wiki/WebApiClient%E8%BF%9B%E9%98%B6) |
69 | 51 | 3. [WebApiClient高级](https://github.com/dotnetcore/WebApiClient/wiki/WebApiClient%E9%AB%98%E7%BA%A7) |
70 | 52 | 4. [WebApiClient.Extensions](https://github.com/xljiulang/WebApiClient.Extensions) |
71 | 53 | 5. [WebApiClient.Tools.Swagger](https://github.com/xljiulang/WebApiClient.Tools) |
72 | 54 |
|
73 | | -#### 5. 联系方式 |
74 | | -1. 加Q群825135345 注明WeApiClient |
75 | | -2. 邮箱366193849@qq.com,不重要的尽量不要发 |
| 55 | +### 4 QQ群 |
| 56 | +> 加Q群[825135345](https://shang.qq.com/wpa/qunwpa?idkey=c6df21787c9a774ca7504a954402c9f62b6595d1e63120eabebd6b2b93007410),注明WeApiClient |
76 | 57 |
|
0 commit comments