Last active
November 12, 2016 14:23
-
-
Save olieidel/1e37926b22f15a0b2bc81902dc54951d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# trying to create an auth request with the microsoft cognitive | |
# services translator api. | |
# as seen here: http://docs.microsofttranslator.com/oauth-token.html | |
# endpoint in question (POST): https://api.cognitive.microsoft.com/sts/v1.0/issueToken | |
url = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken" | |
HTTPoison.post! url, "" # empty POST request, no headers | |
# yields: | |
# iex> ** (HTTPoison.Error) :closed | |
# (httpoison) lib/httpoison.ex:66: HTTPoison.request!/5 | |
# also, for get: | |
HTTPoison.get! url # simple GET request | |
# iex> ** (HTTPoison.Error) :closed | |
# (httpoison) lib/httpoison.ex:66: HTTPoison.request!/5 | |
# similar results using HTTPotion. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment