Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7Il9pZCI6IjU3NDZkZTdhMWQ1ZDQxM2MzYjViYTk0MCIsImZpcnN0bmFtZSI6Im1ha3MiLCJsYXN0bmFtZSI6Im1ha3MiLCJwaG9uZSI6IjEzMzcxMzM3IiwiZW1haWwiOiJtYWtzbWFrc0AxMzM3LmNvbSIsInJvbGUiOiJ1c2VyIiwiaGFzaCI6IiQyYSQxMCRkVC91bTFoTE95MnRIZUxKbjhQLnlPa0hxYU5xQS5NdXpSRnkydzRaRHQuUzhnbVJtT0FpcSJ9LCJpYXQiOjE0NjQ2OTA4NjEsImV4cCI6MTQ2NDY5ODA2MX0.sbq1mEVRpQ-mZ3PketzjLBdka1SCuxH8ijX_0HSnSZ0';
- //var token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7Il9pZCI6IjU3NDZkZTdhMWQ1ZDQxM2MzYjViYTk0MCIsImZpcnN0bmFtZSI6Im1ha3MiLCJsYXN0bmFtZSI6Im1ha3MiLCJwaG9uZSI6IjEzMzcxMzM3IiwiZW1haWwiOiJtYWtzbWFrc0AxMzM3LmNvbSIsInJvbGUiOiJ1c2VyIiwiaGFzaCI6IiQyYSQxMCRkVC91bTFoTE95MnRIZUxKbjhQLnlPa0hxYU5xQS5NdXpSRnkydzRaRHQuUzhnbVJtT0FpcSJ9LCJpYXQiOjE0NjQ2ODY4MTcsImV4cCI6MTQ2NDY5NDAxN30.9QSwyOj-4ZERbwGm4_fWW-ew2q0LmM2neqbaK-z2O0g';
- /*$.ajax({
- type: "POST",
- dataType: 'json',
- url: "http://192.168.2.29:3000/mapi/resources/mlogin",
- timeout: 500,
- data: {username: 'maksmaks@1337.com', password: '13371337'},
- success: function(data) {
- //show content
- console.log(data.status + " Auth");
- console.log(data.message);
- console.log('Success!')
- },
- error: function( data1 ) {
- console.log( data1.status + " Auth");
- console.log( data1.responseJSON);
- }
- });
- */
- /*$.ajax({
- type: "POST",
- dataType: 'json',
- url: "http://192.168.2.29:3000/api/resources/report",
- data: {cause: 'Jesus', company: 'MAMK', details: 'Hail Hydra'},
- success: function(data) {
- //show content
- console.log(data.status + " Auth");
- console.log(data.message);
- console.log('Success!')
- },
- error: function( data1 ) {
- console.log( data1.status + " Auth");
- console.log( data1.responseJSON);
- }
- });
- */
- $.ajax({
- type: 'GET',
- dataType: 'json',
- url: 'http://192.168.2.29:3000/mapi/resources/reports',
- data: {access_token : 'sds'},
- success: function(data){
- console.log(data);
- console.log("Success");
- },
- error: function(data){
- console.log(data.status);
- console.log(data);
- }
- });
- /*$.ajax({
- type: "POST",
- dataType: 'json',
- url: "http://192.168.2.29:3000/mobile/mlogin",
- data: {username: 'maksmaks@1337.com', password: '13371337'},
- success: function(data) {
- //show content
- console.log(data.token);
- console.log('Success!')
- },
- error: function( data1 ) {
- console.log( data1.status);
- console.log( data1.responseJSON);
- }
- });
- */
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement