This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This document now exists on the official ASP.NET core docs page.
using Microsoft.Graph; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; |
https://aka.ms/aspnetcore-makeover
A minimal sample app using ADAL.JS and plain old vanilla JavaScript to obtain an access token from Azure Active Directory and use that access token to make an API request. In this case, the API we're requesting a token for is the Microsoft Graph API, which is used to retrieve the signed-in user's basic profile.
You can see (and test) this live at: https://bl.ocks.org/psignoret/raw/50e88652ae5cb6cc157c09857e3ba87f/
/* Meteor's ES6 Javascript linting configuration | |
* | |
* Documentation on rules can be found at: | |
* http://eslint.org/docs/rules/ <- Optionally append the rulename | |
* | |
*/ | |
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, |
// Thanks @trusktr | |
var requestSync = Meteor.wrapAsync(function(url, callback) { | |
request(url, function(error, response, body) { | |
callback(error, {response: response, body: body}) | |
}) | |
}); | |
var result = requestSync("http://google.com"); | |
console.log(result.response, result.body); |
{"BarryMode/grav-plugin-blackhole":{"17642":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17643":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17644":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17645":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17646":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17647":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issue |