Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
741ab533
Verified
Commit
741ab533
authored
Mar 31, 2018
by
Eliot Berriot
Browse files
Added proper header when querying activity pub actor
parent
ee0341ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/federation/actors.py
View file @
741ab533
...
...
@@ -10,10 +10,18 @@ from . import utils
def
get_actor_data
(
actor_url
):
response
=
requests
.
get
(
actor_url
)
response
=
requests
.
get
(
actor_url
,
headers
=
{
'Accept'
:
'application/activity+json'
,
}
)
response
.
raise_for_status
()
return
response
.
json
()
try
:
return
response
.
json
()
except
:
raise
ValueError
(
'Invalid actor payload: {}'
.
format
(
response
.
text
))
SYSTEM_ACTORS
=
{
'library'
:
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment