16.3. Complete Examples¶
Several complete and working code examples accompany this reading so
that readers can see the java.net.http
package in some real-world
situations. To download these examples, use the following command:
$ curl -s -L https://github.com/cs1302uga/cs1302-tutorials/raw/master/web/setup.sh | bash
Here is a list of the examples:
Name |
Description |
---|---|
|
Get text content hosted by the Project Gutenberg website. |
|
Get image data to construct a JavaFX |
|
Get license data using the GitHub API, then parse the JSON-formatted string in the response body using Google’s Gson library. |
|
Get results from the iTunes Search API, then parse the JSON-formatted string in the response body using Google’s Gson library. |
To run an example, use the provided compile.sh
script along with the
name of the example:
$ ./compile.sh cs1302.web/cs1302.web.Example0