Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. man
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    man

    @man

    10
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    man Unfollow Follow

    Latest posts made by man

    • RE: Ré-écriture de Wifinfo pour traiter le mode standard du Linky

      Bonjour, je suis en train de regarder pour adapter l'envoi du code actuel vers jeedom car le plugin teleinfo à changé et il faut envoyer des variables en POST. (webclient.cpp)
      Hors c'était http.GET qui était utilisé et le http.POST ne fonctionne pas. Je ne suis pas connaisseur du cpp, qqun aurait une idée ? je reçois bien l'url (GET) mais rien en POST.
      Merci

      boolean httpPost(char * host, uint16_t port, char * url,char * varPost ) {
      HTTPClient http;
      bool ret = false;

      unsigned long start = millis();

      // configure traged server and url
      http.begin(host, port, url);

      Debugf("http%s://%s:%d%s => ", port==443?"s":"", host, port, url);

      http.addHeader("Content-Type", "text/plain");
      // start connection and send HTTP header
      int httpCode = http.POST(varPost);
      if(httpCode) {
      // HTTP header has been send and Server response header has been handled
      Debug(httpCode);
      Debug(" ");
      // file found at server
      if(httpCode == 200) {
      String payload = http.getString();
      Debug(payload);
      ret = true;
      }
      } else {
      DebugF("failed!");
      }
      Debugf(" in %d ms\r\n",millis()-start);
      http.end();
      return ret;
      }

      posted in WifInfo
      M
      man