Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. HTTP POST string per blockly senden oder curl string

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    HTTP POST string per blockly senden oder curl string

    This topic has been deleted. Only users with topic management privileges can see it.
    • The Spirit
      The Spirit last edited by

      HI.

      Hab ein Gerät, welches ich über http post steuern kann.

      Dazu muss ich ein post mit einer http Adresse und dem Befehl UP oder DOWN schicken.

      Wie kann ich das in blockly machen?

      Als zweite Möglichkeit hätte ich nen kompletten curl string.

      curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "DOWN" "http://ip:port/rest/items/wohnzimmer_auf_zu"
      

      Geht damit was?

      Danke,

      Andreas

      1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer last edited by

        https://github.com/ioBroker/ioBroker.ja … equest-url

        Geht nur relativ beschränkt (GET ohne Body).

        Als Alternative kannst du das Request-Modul in einer JavaScript-Funktion verwenden, die du in dein Blockly einbindest:

        https://github.com/request/request => hier mal etwas lesen (request.post)

        https://github.com/ioBroker/ioBroker.ja ... turn-value => Einbinden einer JS-Funktion in Blockly

        C 1 Reply Last reply Reply Quote 0
        • The Spirit
          The Spirit last edited by

          Hi.

          Danke schonmal.

          Das erste kann ja nicht gehen, da ich ja den POST Befehl "DOWN" dann ja nicht mit schicken kann, oder?

          Die anderen beiden Punkte muss ich mir mal ansehen.

          Danke

          1 Reply Last reply Reply Quote 0
          • The Spirit
            The Spirit last edited by

            Hab mir jetzt die beiden letzten links noch angesehen.

            Jedoch werde ich darauf nicht ganz schlau.

            Bin leider noch eher Anfänger.

            Kannst du mir mal was zusammen basteln?

            Danke,

            Andreas

            nik82 1 Reply Last reply Reply Quote 0
            • nik82
              nik82 Most Active @The Spirit last edited by

              Hallo,
              ich weiß das Thema ist schon alt, aber genau das was ich auch suche.
              Wie kann ich über Javascript bzw. am besten per Blockly einen Curl-Befehl (also ein HTTP Post mit Body) ausführen?

              Danke im Voraus.

              1 Reply Last reply Reply Quote 0
              • C
                claus1968 @AlCalzone last edited by

                @alcalzone
                Aus dem ersten Link werde ich auch nicht schlau. Bin ebenfalls Anfänger.
                Leider kann ich nur ein bisschen Blockly programmieren.
                Der zweite Link ist tot (404)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Support us

                ioBroker
                Community Adapters
                Donate

                886
                Online

                31.8k
                Users

                80.0k
                Topics

                1.3m
                Posts

                4
                6
                3766
                Loading More Posts
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes
                Reply
                • Reply as topic
                Log in to reply
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                The ioBroker Community 2014-2023
                logo