ESP8266 AMAZON GET REQUEST ?

Using the weesp8266 library for arudino , i manage to connect via tcp to my server in amazon .

Then trying to send get request ,which works in any browser(and http tool for requests) but NOT in the esp.
Here is the get :

GET /http://ec2-xx-xx-xx4-xx.compute-1.amazonaws.com/index.php HTTP/1.1
Host:ec2-52-91-234-18.compute-1.amazonaws.com
User-Agent:runscope/0.1
Content-Type:application/json
Accept-Encoding:gzip,deflate

and here is the code ardunio :

char *hello = "GET /http://ec2-xx-x1-xxx-xx.compute-1.amazonaws.com/index.php HTTP/1.1\r\nHost:ec2-52-91-234-18.compute-1.amazonaws.com\r\nUser-Agent:runscope/0.1\r\nContent-Type:application/json\r\nAccept-Encoding:gzip,deflate\r\n";
    Serial.println(hello);
    wifi.send((const uint8_t*)hello, strlen(hello));
    uint32_t len = wifi.recv(buffer, sizeof(buffer), 10000);
    if (len > 0) {
        Serial.print("Received:[");
        for(uint32_t i = 0; i < len; i++) {
            Serial.print((char)buffer[i]);
        }
        Serial.print("]\r\n");

Whats wrong here ?

When sent from my browser the GET looks more like:

GET /index.php HTTP/1.1\r\n
Host: ec2-52-91-234-18.compute-1.amazonaws.com\r\n
Accept-Encoding: gzip,deflate\r\n
User-Agent:runscope/0.1\r\n
Content-Type:application/json\r\n
\r\n

Looks like you have the whole URL where the filename goes and you left out the final \r\n.

Note: You can put quotes around each line of the string since adjacent string constants are merged together.[/color]

char *hello = 
    "GET /index.php HTTP/1.1\r\n"
    "Host: ec2-52-91-234-18.compute-1.amazonaws.com\r\n"
    "User-Agent:runscope/0.1\r\n"
    "Content-Type:application/json\r\n"
    "Accept-Encoding:gzip,deflate\r\n"
    "\r\n";