You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entity’s handling of media types has several related subtle flaws:
Entity returns the content type as an unparsed string, which maybe contain obscure media type options (text/x.vnd.crazy+plain; charset=utf-8; vndparam=whatever) and thus be difficult to work with.
Related to the above, the nice media type matching available to ResponseTransformers isn't available anywhere else.
The code leans on NSHTTPURLResponse to extract the charset, which means that charset is confusingly a stored property where contentType and etag are derived from headers. This means that (1) contentType and charset can conflict, and (2) charset is an annoying special case in the init & serialization code.
A nice solution to all these things would be to expose a robust MediaType struct instead of a raw string. Something to do after all the basics are in place.
The text was updated successfully, but these errors were encountered:
Entity
’s handling of media types has several related subtle flaws:text/x.vnd.crazy+plain; charset=utf-8; vndparam=whatever
) and thus be difficult to work with.A nice solution to all these things would be to expose a robust MediaType struct instead of a raw string. Something to do after all the basics are in place.
The text was updated successfully, but these errors were encountered: