25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Add Accept header to requests issued by rest.erl

This commit is contained in:
Paweł Chmielowski 2019-02-25 16:18:13 +01:00
parent db9435942f
commit d04a2454cc

View File

@ -84,6 +84,7 @@ request(Server, Method, Path, Params, Mime, Data) ->
Opts = [{connect_timeout, ?CONNECT_TIMEOUT}, Opts = [{connect_timeout, ?CONNECT_TIMEOUT},
{timeout, ?HTTP_TIMEOUT}], {timeout, ?HTTP_TIMEOUT}],
Hdrs = [{"connection", "keep-alive"}, Hdrs = [{"connection", "keep-alive"},
{"Accept", "application/json"},
{"User-Agent", "ejabberd"}] {"User-Agent", "ejabberd"}]
++ custom_headers(Server), ++ custom_headers(Server),
Req = if Req = if