POST request to dweet.io

Hello everyone I am trying to connect my Uno with my ethernet shield to dweet.io. For some reason I can not read from the dweet.io. I have made all the necessary setup. Anyone able to help me out with my arduino code? :confused:

#include <SPI.h>
#include <Ethernet.h>

const int analogIn = A0;
int analogVal = 0;

byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(10, 7, 4, 148);

// initialize the library instance:
EthernetClient client;

char server[] = "www.dweet.io";

unsigned long lastConnectionTime = 0;             // last time you connected to the server, in milliseconds
const unsigned long postingInterval = 10L * 1000L; // delay between updates, in milliseconds
// the "L" is needed to use long type numbers

void setup() {
  // start serial port:
  Serial.begin(9600);
  Serial.println("--- Start ---");
  
  // give the ethernet module time to boot up:
  delay(1000);
  // start the Ethernet connection using a fixed IP address and DNS server:
  Ethernet.begin(mac, ip); 
  // print the Ethernet board/shield's IP address:
  Serial.print("My IP address: ");
  Serial.println(Ethernet.localIP());
}

void loop() {
  // if there's incoming data from the net connection.
  // send it out the serial port.  This is for debugging
  // purposes only:
  if (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // if ten seconds have passed since your last connection,
  // then connect again and send data:
  if (millis() - lastConnectionTime > postingInterval) {
    httpRequest();
  }

}

// this method makes a HTTP connection to the server:
void httpRequest() {
  // close any connection before send a new request.
  // This will free the socket on the WiFi shield
  client.stop();

  // if there's a successful connection:
  if (client.connect(server, 80)) {
    Serial.println("connected");
    analogVal = analogRead(analogIn);
    
    // Make a HTTP request:
    String s = "POST /dweet/for/zagoribotieee?alex=good";
    s.concat(analogVal);
    Serial.println(s);
    client.println(s);
    client.println("Host: www.dweet.io");
    client.println("Connection: close");
    client.println();

    // note the time that the connection was made:
    lastConnectionTime = millis();
  }
  else {
    // if you couldn't make a connection:
    Serial.println("connection failed");
  }
}

thank you

Try:

xmarkx:
// Make a HTTP request:
String s = "GET /dweet/for/zagoribotieee?alex=good";
s.concat(analogVal);
s.concat(" HTTP/1.0");

That's changing POST to GET and then postfixing "HTTP/1.0" on the end. Final string would look like:

GET /dweet/for/zagoribotieee?alex=good123 HTTP/1.0

I have made all the necessary setup.

Really? You attempt to POST data, and the server returns some information that you ignore. There just might be a clue-by-four waiting there to whack you.

PaulS:
Really? You attempt to POST data, and the server returns some information that you ignore. There just might be a clue-by-four waiting there to whack you.

What exactly do you mean? I am just trying to configure this out and make it work. Hack me how? Hack an HTTP request? Worst case scenario?

thank you for your time.