Created
August 10, 2018 11:54
-
-
Save vdubyna/2381dd31a411cfe69c121fd0f1f0dcd7 to your computer and use it in GitHub Desktop.
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
jQuery.ajax({ | |
contentType: 'application/json', | |
data: JSON.stringify({"username": "[email protected]", "password": "Qwer1234"}), | |
dataType: 'json', | |
processData: false, | |
type: 'POST', | |
url: 'https://pha-m2-stg.lcgosc.com/rest/default/V1/integration/customer/token' | |
}).done(function (token) { | |
jQuery.ajax({ | |
contentType: 'application/json', | |
headers: { | |
"Authorization": "Bearer " + token | |
}, | |
dataType: 'json', | |
processData: false, | |
type: 'GET', | |
url: 'https://pha-m2-stg.lcgosc.com/rest/default/V1/customers/me' | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment