simonhdickson/Fancy — pull request #4 by albertjan (2014-07-09 12:35:41+00:00)
Title: Convenience methods for Response, Negotiator and Testing.Browser

Adds convenience methods to do content negotation looks something like this:

```f#
type TestModule() as this =
inherit NancyModule()
do fancy this {

get "/%s/%d/%s" (fun s i s1 (c:CancellationToken) -> fancyAsync {
let a = "%"
return this.Negotiate
|> ResponseOrNegotiator.Negotiator
|> addModel (Model {name = this.s})
|> statusCode (Number 418)
})
```
Does the same sort of thing for `Response`

```f#
ctx.Response
|> ResponseOrNegotiator.Response
|> contents (fun s ->
use sw = new StreamWriter(s)
sw.Write("banananas"))
|> ignore
```

Also adds a `FancyBrowser` for testing. Has a better interface to construct a `Nancy.Testing.Browser`

I haven't looked at the build script. It needs to be modified so it also creates a `Fancifull.Testing` nuget package :smile:

Have still to decide on what of this needs to be tested. Since we're only adding a small layer over the well tested stuff in nancy I don't see why we'd want to test this. Nancy also doesn't test their extension methods on response and negotiator.