hey guys,
I am working on a project for which I need to make certain Web Request from the nodemu and I am not able to do so,
here is the code.

      if ( param.asInt() == HIGH){
      String url = "";  // url


I fixed your post formatting… again.

these are not too useful details…
could you provide a bit more sciencific information?

  • did the code compiles?
  • did the http request arrives to the server?
  • did the server returns any http code?
  • etc
1 Like


the code compiles but it does not arrives at the server.

how do you know that for sure the request doesn’t arrive to the server?

the next logical question is “why”…

  • the “if” condition gets ever executed?
  • the url format is correct?
  • test another url and see if that works
  1. the if statement does in fact works perfectly.
  2. the url format is correct.
  3. i tested it with an ifttt url which does not work.

possible reason
i think that there is some problem with my code.

ps:- i am not at all good at coding (just an 18 year old)
when i enter the url in the blynk app using the WebHook Widget. it works.

basically this url turns on my Air Conditioner so by using the WebHook widet attached to a virtual pin and using a switch widget attached to the same Pin. i can turn on the ac but in order turn the AC off i need to send another url. which i don’t know how to send using the same swtch when in off position.

similarly i plan to use this approach. to controll by TV’s volume and my KODI’s media controlll using the blynk widgets for the same.

what i want is a sample code that i can enter into the then part of my if statement to send pretty much any url that works when entered into the url Tab of the browser.

please respond

If this is a Button widget, set to Switch mode in the app then it will send a “1” when on and a “0” when off.


yes, i know that but you see thats not the problem. i want to send http requests to the internet and thats where i face the problem

I’ve just given you the answer to that question, but you don’t seem interested.
I’ll take a back seat and let others help you with your problem.


i was able to turn on AC by using a WebHook Widget in the Blynk app. i did nothing to the code. as far as Blynk_write is concerned i know how to use that. i just don’t know how to send WEB REQUEST. and don’t be that rude bro

Official Example Reference

please post full code!!
Where you have declared the variable “http”?

you can try this code, and watch the return variable of GET command:

    Serial.print("[HTTP] begin...\n");
    // configure traged server and url
    http.begin(""); //HTTP

    Serial.print("[HTTP] GET...\n");
    // start connection and send HTTP header
    int httpCode = http.GET();

    // httpCode will be negative on error
    if (httpCode > 0) {
      // HTTP header has been send and Server response header has been handled
      Serial.printf("[HTTP] GET... code: %d\n", httpCode);

      // file found at server
      if (httpCode == HTTP_CODE_OK) {
        String payload = http.getString();
    } else {
      Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());


Or maybe a problem of non standart http port “1234” ??

have you tried to replace “:” with “%3A” ?