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

Objections to changing boundary to internal on MultiPartFormDataContent? #1970

Closed
jschneidereit opened this issue Jun 25, 2020 · 7 comments · Fixed by #2003
Closed

Objections to changing boundary to internal on MultiPartFormDataContent? #1970

jschneidereit opened this issue Jun 25, 2020 · 7 comments · Fixed by #2003
Assignees

Comments

@jschneidereit
Copy link
Contributor

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)
}
@e5l e5l added the feature label Jun 26, 2020
@e5l e5l self-assigned this Jun 26, 2020
@e5l
Copy link
Member

e5l commented 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 :)

@e5l e5l added the triaged label Jun 26, 2020
@jschneidereit
Copy link
Contributor Author

@e5l - Change is in progress and it looks like I'd have to make MultiPartFormDataContent open, is that acceptable?

@e5l
Copy link
Member

e5l commented Jun 30, 2020

That's OK

@jschneidereit
Copy link
Contributor Author

Hey @e5l could I get a review on the linked PR? I saw in contributing that there were documentation changes required but am not sure what changes I should make since they'll be picked up by intellisense 🤔

@cy6erGn0m
Copy link
Contributor

Using inheritance for extending is generally not the best option and usually causes difficulties due to inheritance and instantiation limitations. I would prefer adding a constructor parameter with the default argument computing by the generate function. So one could simply pass a custom value if required.

@jschneidereit
Copy link
Contributor Author

@cy6erGn0m how about my solution in #2003?

@oleg-larshin
Copy link

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@e5l e5l closed this as completed in #2003 Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment