From bb6a3e5f8a1246b806a2b90fd432c26089698545 Mon Sep 17 00:00:00 2001 From: Hesaam Farhang Date: Fri, 1 Sep 2017 12:22:15 -0700 Subject: [PATCH] _view_cleanup expect content-type header --- src/couchbeam.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/couchbeam.erl b/src/couchbeam.erl index daf4970c..df984a81 100644 --- a/src/couchbeam.erl +++ b/src/couchbeam.erl @@ -299,7 +299,8 @@ view_cleanup(#db{server=Server, name=DbName, options=Opts}) -> Url = hackney_url:make_url(couchbeam_httpc:server_url(Server), [DbName, <<"_view_cleanup">>], []), - Resp = couchbeam_httpc:db_request(post, Url, [], <<>>, Opts, [200]), + Headers = [{<<"Content-Type">>, <<"application/json">>}], + Resp = couchbeam_httpc:db_request(post, Url, Headers, <<>>, Opts, [200]), case Resp of {ok, _, _, Ref} -> catch hackney:skip_body(Ref),