This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples.docs | |
import com.atlassian.applinks.api.ApplicationLink | |
import com.atlassian.applinks.api.ApplicationLinkService | |
import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType | |
import com.atlassian.jira.issue.Issue | |
import com.atlassian.sal.api.component.ComponentLocator | |
import com.atlassian.sal.api.net.Request | |
import com.atlassian.sal.api.net.Response | |
import com.atlassian.sal.api.net.ResponseException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var username = ''; | |
var password = ''; | |
var encoded_credentials = new Buffer(username + ':' + password).toString('base64'); | |
fetch('https://example.com', { method: 'POST', headers: {'Authorization': 'Basic ' + encoded_credentials} }) | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(body) { |