Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问 HttpApiClient.Create<T>() 还支持吗? #237

Closed
shiyl962 opened this issue Sep 5, 2023 · 1 comment
Closed

请问 HttpApiClient.Create<T>() 还支持吗? #237

shiyl962 opened this issue Sep 5, 2023 · 1 comment

Comments

@shiyl962
Copy link

shiyl962 commented Sep 5, 2023

如题,需要如文章:1.1 最简单的Get请求#

public interface MyWebApi : IDisposable
{
// GET http://www.mywebapi.com/webapi/user?account=laojiu
[HttpGet("http://www.mywebapi.com/webapi/user")]
ITask GetUserByAccountAsync(string account);
}

var myWebApi = HttpApiClient.Create();
var userStr = await myWebApi.GetUserByAccountAsync("laojiu");
myWebApi.Dispose();

来调用此库,但找不到 HttpApiClient.Create() ,请问 HttpApiClient.Create() 还支持吗?
盼复,谢谢!

@EzrealJ
Copy link
Collaborator

EzrealJ commented Sep 7, 2023

你好,WebApiClientCore仅支持依赖注入环境下使用,老版本WebApiClient.Jit支持这种形式的使用,详情参考文档 https://webapiclient.github.io 新老版本文档都包含

@EzrealJ EzrealJ added the 等待反馈(needs feedback) 这意味着需要来自发起者的反馈(This means that feedback from the author is required) label Sep 10, 2023
@EzrealJ EzrealJ removed the 等待反馈(needs feedback) 这意味着需要来自发起者的反馈(This means that feedback from the author is required) label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants