Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
create-ticket: fix request
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Aug 6, 2024
1 parent d753d00 commit 71b5b5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflows/plugins/hooks/inspirehep/inspire_http_hook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import logging

import requests
Expand Down Expand Up @@ -28,7 +27,6 @@ def tenacity_retry_kwargs(self) -> dict:
def headers(self) -> dict:
return {
"Authorization": f'Bearer {Variable.get("inspire_token")}',
"Accept": "application/vnd+inspire.record.raw+json",
}

def run(
Expand Down Expand Up @@ -56,10 +54,12 @@ def run(
return self.run_and_check(session, prepped_request, extra_options)

def call_api(self, method: str, endpoint: str, data: dict) -> Response:
self.log.info("HEADERS ARE")
self.log.info(str(self.headers))
return self.run_with_advanced_retry(
_retry_args=self.tenacity_retry_kwargs,
endpoint=endpoint,
headers=self.headers,
data=json.dumps(data),
data=data,
method=method,
)

0 comments on commit 71b5b5e

Please sign in to comment.