I try to create new task or stroy on my jira project but when I used post method an error 403 spawn. I have this error with my Angular code but with Postman it works perfectly.
In angular, I have no problem with get method.
let jiraTemplate = { "fields": { "project": { "key": "JIR" }, "summary": "test", "description": { "version": 1, "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "description", } ] } ] }, "issuetype": { "name": "Story", } } } } }); const url = 'https://<myWebSite>.atlassian.net/rest/api/3/issue/' const header = new HttpHeaders({ 'Authorization': 'Basic ' + btoa("<login>:<token>"), 'Accept': 'application/json', 'Content-Type': 'application/json;charset=UTF-8', }); const option = {headers: header} this.http.post(url, JSON.stringify(jiraTemplate), option) .subscribe(data => { console.log('🚀 ~ data', data); })
It looks like you're new here. Sign in or register to get started.