Created
June 10, 2019 13:09
-
-
Save brettrowberry/bd9cf26fce1c6bf556e46ce13a48cd3e 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
Shows calling a URL passing a bearer token. Like a poor person's Postman using F# Interactive. |
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
open System.Net | |
let url = "http://someendpoint" | |
let token = "some token" | |
let wc = new WebClient() | |
let whc = WebHeaderCollection() | |
whc.Set("Authorization", "Bearer " + token) | |
wc.Headers <- whc | |
wc.DownloadString url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment