dispatch/reboot — pull request #84 by efuquen (2014-06-12 17:47:30+00:00)
Title: Default Content Type set in toRequestBuilder

This PR fixes #82. Instead of setting Content-Type in the `<<` function it will be set at `toRequestBuilder`. This gives the API user the ability to set the `Content-Type` at anytime before the request is actually consumed w/o fear of setting multiple Content-Type's.

In order to do this a simple state variable was added to `Req` that keeps track of what `setBody` was last called, which allows us to set the default `text/plain; charset=UTF-8` header if body was set as a string and no previous header was set. We still maintain the immutability of `Req` via adding the `toState` transformation function that will reconstruct a new `Req` with a new `Req.State` whenever it is called.