Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F13520438
web_push_http_client_mock.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
623 B
Referenced Files
None
Subscribers
None
web_push_http_client_mock.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.WebPushHttpClientMock
do
def
get
(
url
,
headers
\\
[],
options
\\
[])
do
{
res
,
%
Tesla.Env
{
status
:
status
}
}
=
Pleroma.HTTP
.
request
(
:get
,
url
,
""
,
headers
,
options
)
{
res
,
%{
status_code
:
status
}}
end
def
post
(
url
,
body
,
headers
\\
[],
options
\\
[])
do
{
res
,
%
Tesla.Env
{
status
:
status
}
}
=
Pleroma.HTTP
.
request
(
:post
,
url
,
body
,
headers
,
options
)
{
res
,
%{
status_code
:
status
}}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sun, Dec 7, 7:34 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
574433
Default Alt Text
web_push_http_client_mock.ex (623 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment