JIRA Cloud REST API - Put request via Angular application returns 'is not allowed by Access-Control'

Bas Joosten February 22, 2018

I'm currently running into a problem with the application I'm writing. I'm currently working in Angular 5 for the first time and I've been trying to update the assignee of an issue.

When I test my method in Postman it passes and the information gets changed, but when I try it in my application I get the following error:

'Method PUT is not allowed by Access-Control-Allow-Methods in preflight response.'

 

Differences in results (Google Chrome and Postman)

The status code I get back in my browser is 200. In Postman this is 204.

The 'X-AUSERNAME' in my browser is 'anonymous', but in Postman this is my own username. I also can't find an Authorization header in my request headers in my browser. I do however set the header before I make the request. This doesn't occur when I'm executing a GET request. The other headers I set seem to be missing in the request headers as well.

 

This picture is the code I'm using at this time

Error response.png

 

This is the request header from my browserRequest_header.png

 

Anyone who ran into a similar problem?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2018

Dear @Bas Joosten,

best you ask this question again on the Developer Community.

Thanks for understanding

Thomas