Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. (gelöst) javascript v8.3.1 - Umbau request method DELETE

    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

    (gelöst) javascript v8.3.1 - Umbau request method DELETE

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MCU @stenmic last edited by MCU

      @stenmic Und so?

      //var requestDelete = require('request');
      let url = 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val);
      var options = {
           method: 'DELETE'
      };
      httpGet(url , options, function  (error, response) {
          log('error: ' + error);
          log('response: ' + JSON.stringify(response));
          log('body: ' + response.data);
      });
       
      
      
      haus-automatisierung 1 Reply Last reply Reply Quote 0
      • haus-automatisierung
        haus-automatisierung Developer Most Active @MCU last edited by

        @mcu Delete gibts aktuell nicht. Muss man per axios o.ä. selbst implementieren.

        Bitte in die Doku schauen und keine Parameter raten. Das müsste schon rot unterstrichen werden wenn man ein Objekt als ersten Parameter reingibt

        M S Homoran 3 Replies Last reply Reply Quote 0
        • M
          MCU @haus-automatisierung last edited by

          @haus-automatisierung Axios

          const axios = require('axios');
          
          const url = 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val);
          
          axios.delete(url)
              .then(response => {
                  console.log('response: ' + JSON.stringify(response.data));
              })
              .catch(error => {
                  console.log('error: ' + error);
                  if (error.response) {
                      console.log('response: ' + JSON.stringify(error.response.data));
                  }
              });
          
          
          S 1 Reply Last reply Reply Quote 2
          • S
            stenmic @haus-automatisierung last edited by stenmic

            @haus-automatisierung sagte in javascript v8.3.1 - request method DELETE:

            @mcu Delete gibts aktuell nicht. Muss man per axios o.ä. selbst implementieren.

            Bitte in die Doku schauen und keine Parameter raten. Das müsste schon rot unterstrichen werden wenn man ein Objekt als ersten Parameter reingibt

            kein Problem, er versucht wenigstens mir zu helfen.

            1 Reply Last reply Reply Quote 0
            • S
              stenmic @MCU last edited by

              @mcu sagte in javascript v8.3.1 - request method DELETE:

              @haus-automatisierung Axios

              const axios = require('axios');
              
              const url = 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val);
              
              axios.delete(url)
                  .then(response => {
                      console.log('response: ' + JSON.stringify(response.data));
                  })
                  .catch(error => {
                      console.log('error: ' + error);
                      if (error.response) {
                          console.log('response: ' + JSON.stringify(error.response.data));
                      }
                  });
              
              

              PERFEKT!!!
              Danke, so gehts 👌

              1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @haus-automatisierung last edited by

                @haus-automatisierung sagte in (gelöst) javascript v8.3.1 - request method DELETE:

                Bitte in die Doku schauen und keine Parameter raten.

                wie bereits in mehreren Threads erwähnt, hiesige User sind damit überfordert!

                haus-automatisierung 1 Reply Last reply Reply Quote 0
                • haus-automatisierung
                  haus-automatisierung Developer Most Active @Homoran last edited by

                  @homoran Mh? @MCU hat doch direkt danach die Lösung geteilt. Bin nur am Smartphone nebenbei unterwegs und kann hier schlecht Code tippen. War nur ein Hinweis… und hat ja scheinbar geholfen?

                  1 Reply Last reply Reply Quote 1
                  • Homoran
                    Homoran Global Moderator Administrators last edited by

                    @haus-automatisierung sagte in (gelöst) javascript v8.3.1 - request method DELETE:

                    War nur ein Hinweis… u

                    klar, hätte aber dem Hilfesuchenden nicht geholfen. @mcu hat dann auf axios umgebaut, was ein c&p user auch mit Doku nicht kann.

                    haus-automatisierung 1 Reply Last reply Reply Quote 0
                    • haus-automatisierung
                      haus-automatisierung Developer Most Active @Homoran last edited by

                      @homoran sagte in (gelöst) javascript v8.3.1 - request method DELETE:

                      @mcu hat dann auf axios umgebaut, was ein c&p user auch mit Doku nicht kann.

                      Ich hab doch auf seinen Beitrag geantwortet und ihn explizit angesprochen?! Verstehe die Diskussion gerade nicht. Was ist dein Ziel gerade? Dass ich nicht mehr auf die Doku verweisen soll?

                      Homoran 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @haus-automatisierung last edited by Homoran

                        @haus-automatisierung sagte in (gelöst) javascript v8.3.1 - request method DELETE:

                        Ich hab doch auf seinen Beitrag geantwortet und ihn explizit angesprochen?!

                        ok, dann hab ich das übersehen.
                        Ich hielt es für einen allgemeinen Einwurf an den Hilfesuchenden

                        Sorry!

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        410
                        Online

                        31.8k
                        Users

                        80.0k
                        Topics

                        1.3m
                        Posts

                        4
                        13
                        470
                        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