Call JIRA API to create issue prompt xsrf check failed

1. Check whether the client sending the request is httpclient or resttemplate in spring. It’s better to use resttemplate (I just want to replace the client). The request header is as follows. The rest is mei’jia

HttpHeaders headers = new HttpHeaders();
headers.add("X-Atlassian-Token", "no-check");
headers.add("Authorization", JIRA_API_AUTHORIZATION);
headers.add("Content-Type", "application/json");

2. Add configuration in the request header( headers.add (x-atlassian-token, no check); this is the advice given in the official document

3. Modify the user agent in the request header

It’s better to deal with the above items. Generally, this problem can be solved. In addition, post several JIRA API documents.

(create issue) -Rest-api-2-issue-post headers.add (“Authorization”, JIRA_ API_ AUTHORIZATION))

(JIRA official document on security certification related content)

(questions from others in JIRA community)

Similar Posts: