Create the URL, set the method, and send the request.
- Apple News Format
- Apple News API
You make an HTTP request to send or receive data from a server. On this page, you'll make the HTTP request to the Apple News API to get details about the channel, including the name, corresponding website, and default section. See Read Channel Information.
On this page, you'll learn how to:
Create the URL
Set the method to
Send the request.
Copy This Code
Open any text editor to copy this code. Save the file as
Run the Script
Start the command prompt and change to the directory containing
make file. Run this script to make an HTTP request to the Apple News API. This script takes Channel ID as an argument.
The script returns this error:
The error indicates that the authorization header was not included in the request.