This post will only show you how to use ESP8266 with Arduino, for more information such ESP8266 version and the detail of the pins of ESP8266, I will post another post later.
1. you should connect arduino with your computer and write a arduino program into it. Any program will be ok.
2. you should connect ESP8266 and Arduino like this:
Note: please make sure you do write code into arduino first and then disconnect arduino with your computer and change the wire later.
Note: when you have a wire connects with your arduino, you cannot write code to arduino!!!!
3. Open serial monitor to send commands to ESP8266 and test it: (make sure you use the settings of serial monitor, you can do the same setting as my snapshot below, "Both NL & CR" and "9600 baud")
input "AT" and then use Enter key or click "Send" button:
It will response:
Input: AT+CIFSR for checking your IP
--------Below will use ESP8266 send http request to server:
Then ESP8266 will return ">", that indicate that you can send message body now:
Input : GET / HTTP/1.0 (after that you should input 2 enters)
Then you will get:
4. If you want to raptly call this link you can run blow commands:
AT+CIPSEND=4,18GET / HTTP/1.0
5. for another url:
GET /api/things HTTP/1.0
28 is the length of your message.
The message you send out is "GET /api/things HTTP/1.0". The length of it is 24, but why 28?
Because, according to HTTP protocol 1.0 the message body should end up with "/r/n"