I'm trying to talk to a self hosted (Server?) jira instance via rest, from a scala /java application.
There's so much clutter out there and a lot of old information.
I'm thinking this should be really simple, and there would be a sample application, that "just works".
I've tried using apache httpclient basic auth, as in this example https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientAuthentication.java
but am getting 400 code returned.
I can request successfully using postman.
I personally use this library and it works fine all the time. kong.github.io/unirest-java
This is really simple to use. Code looks like this,
HttpResponse response = Unirest.get("{jira_url}/rest/api/2/issue/{issueIdOrKey}") .header("Accept", "application/json")
.basicAuth("{user_name}", "{password}") .asJson(); System.out.println(response.getBody());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.