api: fixes and changes to always return content type in API

- few tweeks here and there
This commit is contained in:
RhodeCode Admin 2023-03-28 10:21:23 +02:00
parent 745c3af99f
commit 047254866b
6 changed files with 67 additions and 58 deletions

View file

@ -86,7 +86,8 @@ def build_data(apikey, method, **kw):
def api_call(app, params, status=None):
response = app.post(
API_URL, content_type='application/json', params=params, status=status)
API_URL, content_type='application/json', params=params, status=status,
headers=[('Content-Type', 'application/json')])
return response