0

so I have a wifi shield and I am sending a web request, but its not going through. I know it's not the server because the other function of the program works properly. My code is available on pastebin

EDIT:

The request that is not working is on line 318

closed as unclear what you're asking by jfpoilpret, rebatoma, dhimaspw, KIIV, Nick Gammon Jan 22 '17 at 7:44

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This is a meaningless question for Stack Exchange. You don't mention what shield, and you haven't posted any code (that will survive if Pastebin goes down. I'm closing it as not a real question. – Nick Gammon Jan 22 '17 at 7:44
1

You are lacking a space:

client.println((String)"GET /msg.php?action=send&ID=2&message=" += currentMessage += "HTTP/1.1");
                                                                                      ^

Your HTTP is running in to the content of your message ending up with a corrupt request. Also you are doing appending within your strings (+=) when you don't need to (+ is all that is needed). In fact, you don't even need that - just do multiple prints and reduce the hammering your heap is getting. Oh, and don't forget to use F():

client.print(F("GET /msg.php?action=send&ID=2&message="));
client.print(currentMessage);
client.println(F(" HTTP/1.1"));

Not the answer you're looking for? Browse other questions tagged or ask your own question.