dolanor / rip

REST in peace
BSD 3-Clause "New" or "Revised" License
68 stars 0 forks source link

codec: separate mimetype for encoding and decoding #7

Open dolmen opened 5 months ago

dolmen commented 5 months ago

This is necessary to remove hack for HTML encoding which is is not symmetrical.

dolanor commented 5 months ago

Do you mean because HTML codec has only encoding and HTML Forms codec only has decoding?

dolmen commented 5 months ago

Yes. AcceptEncoder has hardcoded references to that specific codec.

https://github.com/dolanor/rip/blob/379a63bc43960312259437251ace0f4c1e1a8287/encoding/encoding.go#L90

dolanor commented 5 months ago

Yeah, there is some experimentation of content negociation still all over the place once I played with HTML page and forms. It bled a little more than what I wanted. One day when I'm fresh and a clear mind, I'll refactor all of this, because it is messy.