longshoreman/cli — pull request #3 by msanterre (2014-12-19 17:52:46+00:00)
Title: Remove duplicate JSON serializing operations

Since the `request` module already serializes the request to JSON if the
`json:true` option is passed, serializing the payload beforehand will
result to be a serialized string instead of a serialized object.

Print out of netcat before the change
```
POST /hosts HTTP/1.1
X-Auth: potato
Content-Type: application/json
host: localhost:9090
accept: application/json
content-length: 26
Connection: keep-alive

"{\"host\":\"127.0.0.1\"}"
```

After the change

```
POST /hosts HTTP/1.1
X-Auth: potato
Content-Type: application/json
host: localhost:9090
accept: application/json
content-length: 20
Connection: keep-alive

{"host":"127.0.0.1"}
```