How to pass a string to a post call using python requests

I am implementing a jira api call: Add an observer to the JIRA problem.

A parameter is required Stringinstead JSON.

I am using python queries .

requests.post(url, headers=headers, json=data)

What should be my data value if in the jira documentation I only need to pass String, but the method requests.postaccepts only JSON?

+4
source share
1 answer

Just do:

requests.post(url, headers=headers, data=data)

In accordance with official documents :

, , . string dict, .

+3

Source: https://habr.com/ru/post/1675077/


All Articles