mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 22:49:25 +00:00
http: request builder: send user-agent when making requests
This commit is contained in:
parent
d2dacadb6b
commit
d3b8cd342f
|
@ -45,8 +45,9 @@ defmodule Pleroma.HTTP.RequestBuilder do
|
||||||
Add headers to the request
|
Add headers to the request
|
||||||
"""
|
"""
|
||||||
@spec headers(map(), list(tuple)) :: map()
|
@spec headers(map(), list(tuple)) :: map()
|
||||||
def headers(request, h) do
|
def headers(request, header_list) do
|
||||||
Map.put_new(request, :headers, h)
|
header_list = header_list ++ [{"User-Agent", Pleroma.Application.user_agent()}]
|
||||||
|
Map.put_new(request, :headers, header_list)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|
Loading…
Reference in a new issue