square/okhttp — pull request #949 by mlc (2014-06-19 22:36:21+00:00)
Title: provide a friendlier API for multipart forms.

The super-generic `MultipartBuilder` API is pretty nice, but probably the most common case is building multipart forms. This patch provides a couple of convenience methods preventing the caller from having to write `Content-Disposition: form-data` all the time.

Open questions:
* should the `addFormPart(String name, String value)` overload provided a default content-type, presumably `text/plain; charset=utf-8`? [RFC 2388](http://www.ietf.org/rfc/rfc2388.txt) implies that the answer is yes.
* should we bother to do the quoted-string encoding if the caller includes "special characters" in the field name or filename parameter?

Also note that I can't get the tests to pass even before my changes; a quick review seems to indicate that I didn't make anything *more* broken with these changes, but apologies if I'm wrong here.