Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String auth = "USER:PASS".bytes.encodeBase64().toString()
- StringBuilder builder = new StringBuilder()
- builder.append("issueKey=").append(issue.key)
- query = builder.toString()
- URL url = new URL(REST_API_URL)
- URLConnection connection = url.openConnection()
- connection.setRequestMethod("POST")
- connection.setDoOutput(true)
- connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
- connection.addRequestProperty("Authorization", "Basic "+auth)
- connection.outputStream.write(query.getBytes("UTF-8"))
- connection.connect()
- connection.getContent()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement