Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not marshall empty results

  • Loading branch information...
commit 761448652d5255d7165153f4a5e9ff9f16f892b1 1 parent 345023d
@lafka authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/tavern_marshal.erl
View
3  src/tavern_marshal.erl
@@ -10,6 +10,9 @@ decode(Mime, Payload) ->
{ok, DecodedPayload} = Module:decode(Payload).
-spec encode(MimeType :: binary() | atom(), Payload :: tree()) -> Encoded :: iolist().
+encode(_, Payload) when Payload == []; Payload == <<>>; Payload == {} ->
+ {ok, <<>>};
+
encode(Mime, Payload) ->
Module = map_mime(Mime),
{ok, EncodedPayload} = Module:encode(Payload).

0 comments on commit 7614486

Please sign in to comment.
Something went wrong with that request. Please try again.