![]() ![]() Package main import ( "fmt" "io/ioutil" "log" "net/http" "os" ) func main () Summary So in order to mimic what we’ve just done in the browser in go, we’ll have to Note - When you open a web page in a browser, you are performing a GET Should see a huge JSON string printing out, this is the response we’ll beĮxpecting when our go program performs a GET request on this endpoint. If you navigate to this endpoint in your browser you To get us started we are going to query for all the Pokemon from the originalĮndpoint that returns this. ![]() You will need Go version 1.11+ installed on your development machine.Requires no authentication so there is no barrier to entry. Know but it’s a fully fledged API that follows standard naming conventions and We’ll beĮxposes all the known information for everything Pokemon related. Live API that we can easily test to see if it works in our browser. Github that lists all the public APIs that are available for consumption by usĪnd he’s categorized them so that we can easily drill down to what we want toįor the purpose of this tutorial though, I feel that we should use an already Todd Motto has put together quite an active repo on Open REST APIs out there that are just waiting to be consumed and turned into There are currently hundreds upon thousands of In this tutorial, I’m going to be demonstrating how we can consume an already Note - For a Tutorial on how to build a RESTful API in Go click ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |