WebApiClient Versions Save

An open source project based on the HttpClient. You only need to define the c# interface and modify the related features to invoke the client library of the remote http interface asynchronously.

Core_1.1.0

3 years ago

WebApiClientCore

  • 修复core3.0接口重复注册时"The HttpClient factory already has a registered client with the type"的异常;
  • 增加HttpApi.GetName()和IHttpClientBuilderExtensions的ConfigureHttpApi()多个重载方法;
  • HttpCientContext增加OptionsName属性,方便上层项目的对Options的扩展;

WebApiClientCore.Extensions.OAuths

  • 增加ITokenFactory,用于创建TokenProvider实例;
  • 增加注册自定义TokenProvider的功能,以支持非OAuth的token请求流程;
  • OAuthTokenAttribute支持获取接口的基础接口对应的TokenProvider(多个接口共享TokenTokenProvider);
  • 增加OAuthTokenHandler用于应用token,支持401状态后刷新token并重试请求(服务器token丢失不影响到客户端);

WebApiClientCore.Extensions.NewtonsoftJson

  • 相关Attribute使用HttpCientContext.OptionsName来获取对应的Options值;

Core_1.0.9

3 years ago
  • 提升json反序列化的性能
  • 接口语法不支持,异常由TypeInitializationException改为NotSupportedException
  • 更严谨的null检查

Core_1.0.3

3 years ago
  • 修复当响应的json使用非utf8编码时反序列化的问题
  • 增加过滤掉重复MediaType的IApiReturnAttribute

Core_1.0.2

3 years ago
  • ApiReturnAttribute调整为先验证ContentType匹配之后,再执行其它逻辑(验证响应状态码、设置结果值);
  • 修复nuget包icon消失的问题

Core_1.0.1

3 years ago
  • RequestDelegateBuilder->ContextInvoker
  • 增加xml序列化配置选项
  • netstandard21编译和打包
  • 增加KeyValue序列化键名配置选项
  • 优化提交非utf8的json内容时的数据转码

1.1.2

4 years ago

增加.net core框架下直接与DI集成。

1.1.1

4 years ago

在非.net framework下使用Microsoft.Extensions.Caching.Memory替换System.Runtime.Caching

1.1.0

4 years ago
  • AuthTokenFilter请求前后方法支持重写;
  • 增加支持FileInfo做为文件上传参数
  • 增加JsonString`1类型,表示对象的json文本;

1.0.9

4 years ago
  • 增加HttpApi.RegisterFactory()方法
  • 增加ParameterAttribute,满足一般情况易于理解传参的要求
  • 修复使用了CacheAttribute且缓存命中时RequestMessage没有及时dispose的问题

1.0.8

5 years ago
  • 修复AutoReturnAttribute在处理json或xml时禁用EnsureSuccessStatusCode无效的问题;
  • 修复nfx下请求完成时,会两次触发dispose掉相关的HttpContent的问题;
  • 请求默认Headers从HttpClient的默认请求头修改转移到HttpApiRequestMessage构造函数;
  • 重构请求和响应的请求头打印输出;
  • 完善IDisposable实现机制,LifetimeHttpApiConfig在GC回收时dispose其相关的HttpClient;
  • 重写HttpApi调试的视图;
  • 增加ClientCredentialsTokenFilter类型;