question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Objections to changing boundary to internal on MultiPartFormDataContent?

See original GitHub issue

https://github.com/ktorio/ktor/blob/3ce3906c2bfa3c86238d40e9b67006b2b020bdaf/ktor-client/ktor-client-core/common/src/io/ktor/client/request/forms/FormDataContent.kt#L43

I’d like to change this to internal so I can consume the boundary like so:

class MultiPartMixedDataContent(
        parts: List<PartData>
) : MultiPartFormDataContent {
    override val contentType: ContentType = ContentType.MultiPart.Mixed.withParameter("boundary", boundary)
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
e5lcommented, Jun 30, 2020

That’s OK

1reaction
e5lcommented, Jun 26, 2020

Hi @jschneidereit, thanks for the report. It’s the valid use case and we’re absolutely OK to change that. I think it should be protected to fit your case.

It would be nice if you make the PR 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpClient setting boundary with content-type - Stack Overflow
Once we made this change it all worked correctly. ... ContentType = "multipart/form-data; boundary=" + boundary; request.Headers.
Read more >
Multipart Form Post in C# - Brian Grinstead
I recently had to access a web API through C Sharp that required a file upload. This is pretty easy if you have...
Read more >
Making requests | Ktor
In this case, a boundary will be generated automatically. Call the post function and pass the MultiPartFormDataContent instance to the setBody ...
Read more >
Troubleshooting a Failing DataWeave Script
A common inference error occurs with multipart data, which has a very specific structure. Consider a multipart payload and the expression dw::core::Objects:: ...
Read more >
Web on Reactive Stack - Spring
... are built around reacting to change — network components reacting to I/O events, ... adapts it to a Reactor type internally, uses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found