Request:
POST /api/v1/admin/tokens HTTPS/1.1
Content-Length: 57
Connection: keep-alive
Content-Type: application/json
{"username": "rcotlarc@abrand.com", "password": "12cra13"}
that will produce this
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length
{"token":"42ab136d77ce4e57a931db9e3299c2c82db5b406ad034bcb924e73fe894fcfb1"}
And display the " token"
here's the point that i'm at:
send: function()
{
Ext.Ajax.request({
url: 'https://host/api/v1/admin/tokens',
defaultHeaders: { 'Content-Type': 'application/json' },
method:'Post',
params: {
"username": "root@abrand.com", "password": "12cra13"
},
success: function(response, opts) {
var obj = Ext.decode(response.responseText);
console.dir(obj);
},
failure: function(response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});
}