Skip to content
Snippets Groups Projects
Verified Commit 741ab533 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added proper header when querying activity pub actor

parent ee0341ba
No related branches found
No related tags found
No related merge requests found
......@@ -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': {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment