benoitc/couchbeam — pull request #115 by epappas (2014-11-01 15:19:47+00:00)
Title: #114 Fix; couchbeam:reply_att/1 handles all 20x as success

CouchDB upon the end of streaming, send 201 as success. Couchbeam should handle such cases as success.
So the following part:

```
reply_att({ok, 200, _, Ref}) ->
{[{<<"ok">>, true}|R]} = couchbeam_httpc:json_body(Ref),
{ok, {R}};
```
Becomes:
```
reply_att({ok, Status, _, Ref}) when Status >= 200 andalso Status < 300 ->
{[{<<"ok">>, true}|R]} = couchbeam_httpc:json_body(Ref),
{ok, {R}};
```

Maybe a the same should be applied on 30x & 10x responses?

Cheers.