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

Ktorfit development #102

Open
Foso opened this issue Jan 20, 2023 · 1 comment
Open

Ktorfit development #102

Foso opened this issue Jan 20, 2023 · 1 comment

Comments

@Foso
Copy link
Owner

Foso commented Jan 20, 2023

Do you have questions on how to build the Ktorfit project? Feel free to ask them here.
I wrote a general overview over the components here

@ferenczAndras
Copy link

Hi. I wanted to ask a question regarding StringValues. I have to send an array of id's as formdata.
This is my implementation:

        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)
        )

where eventId: String, groupIds: List<String>

THE API works, if I send 2 or more data inside the groupIds field. But the server get's a different format if there is only 1 value in the list. Any advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants