-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add BodyMultipart #119
Add BodyMultipart #119
Conversation
Pull Request Test Coverage Report for Build 11958952365Details
💛 - Coveralls |
7eea881
to
032aef4
Compare
Nice! 🎉 Would it be possible to make it available as well as a method directly on requests.URL("https://example.com").
BodyMultipart("boundary", func(multi *multipart.Writer) error {
// do something with multi
return nil
}).
Fetch(ctx) |
Do you think there's that much demand for it? OTOH, nesting the Config calls looks pretty ugly. Also unlike some of the other stuff I'm trying to move out to separate packages, this imports mime/multipart, which net/http also imports, so it's not introducing any import dependencies. 🤔 |
There's some weirdness around the random boundary. I think if you created a Builder and reused it, you would get the same "random" boundary every time until you make a new Builder. That's probably an okay limitation for a Config, but for a method I would expect it to work every time… |
Probably not, seeing the activity about the topic in the discussion 😛.
Agreed.
Is it an issue? If the generated boundary is sufficiently random and is already OK for a single usage, I'm guessing that it can be safely reused. There's no requirement for it to change on every request as far as I'm aware of. |
Hello! Any blocker here? Can I help releasing this? :) |
This looks pretty good. I think it can be released as just a config for now and we can decide if it should be promoted to a method later. I want to change the example test to use a content type for en.txt, but other than that it looks good to go. |
032aef4
to
f71cbfa
Compare
No description provided.