500 Internal Server Error, using angular 4 and electron to create auth. session

i am working on building a cross platform desktop app using angular 4 and electron framework to utilize jira api. so i create post request to create authentication session(login) using code below:


 const body = {
      username: 'myusername',
      password: mypassword'
    };

    this.http.post('https://mycompany.atlassian.net/rest/auth/1/session', body).subscribe(data => {
      console.log(data);
    }, error => {
      console.log('errororororororor');
      console.log(error);
    });
  }
};

but i am getting back 500 Internal Server Error,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>Expected authority at index 7: file://</message><stack-trace>java.lang.IllegalArgumentException: Expected authority at index 7: file://
	at java.net.URI.create(URI.java:852)
	at com.atlassian.healthcheck.core.security.HealthCheckCorsDefaults.allowsOrigin(HealthCheckCorsDefaults.java:20)
	at com.atlassian.plugins.rest.common.security.jersey.XsrfResourceFilter$1.apply(XsrfResourceFilter.java:269)
	at com.atlassian.plugins.rest.common.security.jersey.XsrfResourceFilter$1.apply(XsrfResourceFilter.java:267)
	at com.google.common.collect.Iterators.indexOf(Iterators.java:778)
	at com.google.common.collect.Iterators.any(Iterators.java:684)
	at com.google.common.collect.Iterables.any(Iterables.java:623)
       ..... etc.

any idea which api. i should use to get log in to work with electron framework