Join David Gassner for an in-depth discussion in this video Reading a text file from the web, part of Learning Go.
- Go has a rich set of tools that let you work easily…with web applications and services.…The HTTP package lets you make requests…and send data to remote hosts,…and also lets you create HTTP server applications…that listen for and respond to requests.…In this demonstration, I will create an application…that requests and displays some data from a remote host.…This file, webRequest.go, has a string.…It's set to a PHP file on a server.…
I'm going to copy that, and then display it in a browser.…And I'll show that I'm receiving a JSON package,…a set of structured data in the JSON format.…And this is now the most common format…for data exchange with web services.…So here's how I'll work with it.…First, I'll go to my imports, and I'll add net/http.…Then, in my main function,…I'll use a function of the HTTP package named get.…
It's going to return a response object, and an error object.…And I'll pass in the URL string.…And then, I'll use an if statement…to evaluate the error object.…If the error isn't nil, then I'll call the panic function,…
- Installing Go tools
- Creating and compiling a Go workspace
- Exploring variables, constants, and types
- Storing ordered and unordered values
- Grouping related values in structs
- Programming conditional logic and loops
- Defining and calling functions
- Handling errors
- Working with files
- Creating a simple HTTP server
Skill Level Beginner
Programming the Google App Engine with Javawith Patrick Royal2h 4m Intermediate
Google App Engine Essential Trainingwith Joseph Lowery3h 26m Intermediate
1. Getting Started
2. Essential Go Skills
3. Managing Simple Values
4. Managing Complex Types and Collections
5. Managing Program Flow
6. Structuring Go Code
7. Working with Files and the Web
Next steps2m 26s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.