I'm using an Adafruit CC3000 WiFi Shield with an Arduino Mega.
I want to perform GET and POST requests on an API.
I'm using the WebClient sketch that's built into the CC3000 library from Adafruit.
Can someone tell me how I would format an API link for the #define WEBSITE and #define WEBPAGE fields?
The link is: http://ec2-54-174-178-132.compute-1.amazonaws.com:9000/
Here is a link to the WebClient sketch: WebClient | Adafruit CC3000 WiFi | Adafruit Learning System
This would normally be how I would set it up, but this domain wants you to use localhost:9000/api. I do not believe you have the api on the CC3000.
#define WEBSITE "ec2-54-174-178-132.compute-1.amazonaws.com"
#define WEBPAGE "/"
// then later in setup, change this call from 80 to 9000
Adafruit_CC3000_Client www = cc3000.connectTCP(ip, 9000);
If I try that with a web browser, I get this:
Hello! The API is at http://localhost:9000/api