You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we should make buffered=true the default? Seems like the streaming added in 4.0 causes problems for more people than it solves and it should be opt-in.
Not a bad idea, streaming is likely only useful for large streams. I'd actually prefer a refit settings level option to turn it on/off by default rather than having to go more granular.
+1
Just spent a few hours debugging this, since in my case Web.API only occasionally failed to bind the incoming model. I would much prefer to opt-in to streaming.
i don't write BodyAttribute buffered=true , webapi can't request body like this
this is interface code
[Post("/api/Login/Login")]
[Headers("Content-Type:application/json")]
Task<ApiResponse<User>> LoginAsync([Body]LoginDto loginDto);
this is webapi action
[HttpPost]
public ApiResponseBase<User> Login(LoginDto loginDto) { }
but loginDto is null ,If it does‘t contain buffered=true
this is test code
var loginApi = RestService.For<ILogin>("http://localhost:10452");
ApiResponse<User> userRsp = await loginApi.LoginAsync(new LoginDto { LoginName = "test", LoginPwd = "test" });
The text was updated successfully, but these errors were encountered: