-
-
Save marcosaguileraely/e817d0145a8f8c7035037c681ff4fc79 to your computer and use it in GitHub Desktop.
Unirest-java sample code
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
| import com.mashape.unirest.http.*; | |
| import com.mashape.unirest.http.exceptions.UnirestException; | |
| public class HelloMashape { | |
| public static void main(String[] args) throws UnirestException { | |
| HttpResponse<String> request = Unirest.get("https://yoda.p.mashape.com/yoda?sentence=You%20will%20learn%20how%20to%20speak%20like%20me%20someday.%20%20Oh%20wait.") | |
| .header("X-Mashape-Authorization", "<Insert your Mashape key here>") | |
| .asString(); | |
| System.out.println(request.getCode()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment