For the purposes of cross-referencing: https://issues.apache.org/jira/browse/HTTPCORE-271
Bill- On Fri, Aug 26, 2011 at 9:39 AM, Oleg Kalnichevski <[email protected]> wrote: > On Thu, 2011-08-25 at 15:21 -0400, Bill Speirs wrote: >> I just pulled in the fluent-hc code and noticed there was a >> ContentType class: >> fluent-hc/src/main/java/org/apache/http/client/fluent/header/ContentType.java. >> This class defines a handful of constants: HTML, JPEG, PNG, GIF, TEXT, >> XML, and JSON. >> >> There is already a ContentType class in the core code: >> httpcore/src/main/java/org/apache/http/entity/ContentType.java. >> However, this class does not define any constants. >> >> Finally, there is a MediaType class in javax.ws.rs.core. It defines a >> number of constants as well. >> >> All of this, I believe, causes a bit of confusion when I need to >> specify a Content Type. Which class should I be using? >> >> I see 2 options: >> >> 1) Scrap the ContentType class in fluent-hc, keep the one in httpcore, >> and make a note in the JavaDocs of httpcore that if you want constants >> please use javax.ws.rs.core.MediaType. >> 2) Scrap the ContentType class in fluent-hc, keep the one in httpcore, >> pull all of the types in MediaType into the ContentType class >> injavax.ws.rs.core >> httpcore >> >> Thoughts? >> >> Bill- >> > > The fluent facade API is still in a very early state of development. > Nothing is final. I think it does make sense to re-use ContentType code > from HttpCore. I am not sure we should use javax.ws.rs.core, though, as > long as we want to keep JSE 1.5 as a minimal runtime level requirement. > > Do feel free to put changes you are proposing into a patch. > > Cheers > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
