inspirehep / inspire-next

The INSPIRE repo.
https://inspirehep.net
GNU General Public License v3.0
59 stars 69 forks source link

headers: add content-type json #4346

Closed PascalEgn closed 4 months ago

PascalEgn commented 4 months ago

The python 3.11 upgrade of inspirehep will require the requests to be passed with the content type json header.

drjova commented 4 months ago

@PascalEgn at the end we don't need to add them in fuzzy matcher/matcher?

PascalEgn commented 4 months ago

@PascalEgn at the end we don't need to add them in fuzzy matcher/matcher?

Like this we just add them basically everywhere, the get_headers_for_hep_root_table_request() function is also used by the exact-match and fuzzy-match call.

https://github.com/inspirehep/inspire-next/blob/master/inspirehep/modules/workflows/tasks/matching.py#L78 https://github.com/inspirehep/inspire-next/blob/master/inspirehep/modules/workflows/tasks/matching.py#L125