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

String Values body values differ, based on list quantity #521

Open
ferenczAndras opened this issue Feb 21, 2024 · 0 comments
Open

String Values body values differ, based on list quantity #521

ferenczAndras opened this issue Feb 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ferenczAndras
Copy link

Ktorfit version

1.12.0

What happened and how can we reproduce this issue?

I have the following POST request:

        val groups: StringValues = StringValuesSingleImpl(
            caseInsensitiveName = false,
            name = "groupIds",
            values = groupIds
        )

        val bodyParameters = Parameters.build {
            appendAll(groups)
        }

        val result = provider.eventApi.addGroups(
            eventId = eventId,
            authToken = authHeader.value,
            body = FormDataContent(bodyParameters)
        )

And the server receives the following values:

{"level":"info","message":"{\"groupIds\":\"65a568af4227db35f2969637\"}","service":"user-service"}
{"level":"info","message":"{\"groupIds\":[\"65be567a3055e32db9a6eff8\",\"65be550a3055e32db9a6eff4\"]}","service":"user-service"}

The first version contains only one ID, while the second two.

I am missing something?

What did you expect to happen?

To have the same format.

Is there anything else we need to know about?

No response

@ferenczAndras ferenczAndras added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant