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
Describe the bug
If the request is a multipart request, it will constantly load in Alice.
Because in dart http package, the content-type header will be set to a new value with a random boundary after request interceptors.
The original request header is different from response.base.request!.headers.
Alice cannot match request and response, and it will constantly load.
install chopper, chopper_generator, http, http_parser and build_runner
click the call API button
request will constantly load
example_service.dart
@ChopperApi(baseUrl:'/')
abstractclassExampleServiceextendsChopperService {
// A helper method that helps instantiating the service. You can omit this method and use the generated class directly instead.staticExampleServicecreate([ChopperClient? client]) =>_$ExampleService(client);
@Post(path:'upload')
@Multipart()
Future<Response> postExample(
{@PartFile('file') requiredMultipartFile files});
}
Describe the bug
If the request is a multipart request, it will constantly load in Alice.
Because in dart http package, the content-type header will be set to a new value with a random boundary after request interceptors.
The original request header is different from response.base.request!.headers.
Alice cannot match request and response, and it will constantly load.
https://github.com/dart-lang/http/blob/master/pkgs/http/lib/src/multipart_request.dart#L87
Below is response.base.request!.headers
To Reproduce
example_service.dart
main.dart
Expected behavior
Multipart request should not load constantly.
Response should be able to match the request using the getRequestHashCode method.
Additional context
NA
Alice Version
0.4.1
The text was updated successfully, but these errors were encountered: