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

Need to send empty arrays for MultiPart requests #725

Open
Windisch94 opened this issue Dec 4, 2024 · 0 comments
Open

Need to send empty arrays for MultiPart requests #725

Windisch94 opened this issue Dec 4, 2024 · 0 comments

Comments

@Windisch94
Copy link

Windisch94 commented Dec 4, 2024

Its nearly the same as described in #599, but for arrays instead of strings.
When sending an empty array via @MultiPart and @Part the generator skips the property and doesnt send it.

When using without MultiPart und using @Field annotation the empty array got sent.
Example:

@MultiPart()
 @POST('/test')
  Future<ResponseDto> createFile({
    @Part(name: 'data[]') required List<String> data,
    @Part(name: 'images[]') required List<MultipartFile> images,
  });

When sending data as empty array the data property not defined

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

1 participant