Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. (gelöst) javascript v8.3.1 - Umbau request method DELETE

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.2k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.5k

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

Scheduled Pinned Locked Moved JavaScript
13 Posts 4 Posters 848 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M MCU

    @stenmic

    //var requestDelete = require('request');
    var options = {
        url: 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val),
        method: 'DELETE'
    };
    httpGet(options, function  (error, response) {
        log('error: ' + error);
        log('response: ' + JSON.stringify(response));
        log('body: ' + response.data);
    });
    
    
    S Offline
    S Offline
    stenmic
    wrote on last edited by stenmic
    #3

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

    @stenmic

    //var requestDelete = require('request');
    var options = {
        url: 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val),
        method: 'DELETE'
    };
    httpGet(options, function  (error, response) {
        log('error: ' + error);
        log('response: ' + JSON.stringify(response));
        log('body: ' + response.data);
    });
    
    

    danke, aber es geht leider nicht (eventuell wegen dem "DELETE")

    javascript.0 2024-06-01 16:13:12.470	error	at process.processImmediate (node:internal/timers:476:21)
    javascript.0 2024-06-01 16:13:12.470	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:641:29)
    javascript.0 2024-06-01 16:13:12.470	error	at Object.<anonymous> (script.js.3D-Drucker.Printjob:34:11)
    javascript.0 2024-06-01 16:13:12.470	error	at httpGet (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1183:20)
    javascript.0 2024-06-01 16:13:12.470	error	at getHttpRequestConfig (/opt/iobroker/node_modules/iobroker.javascript/lib/tools.js:151:21)
    javascript.0 2024-06-01 16:13:12.469	error	at new NodeError (node:internal/errors:405:5)
    javascript.0 2024-06-01 16:13:12.470	error	at delete2 (script.js.3D-Drucker.Printjob:11:5)
    javascript.0 2024-06-01 16:13:12.470	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1399:38)
    javascript.0 2024-06-01 16:13:12.470	error	at Immediate.<anonymous> (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8489:62)
    javascript.0 2024-06-01 16:13:12.469	error	script.js.3D-Drucker.Printjob: TypeError [ERR_INVALID_URL]: Invalid URL
    javascript.0 2024-06-01 16:13:12.469	error	at new URL (node:internal/url:676:13)
    
    M 1 Reply Last reply
    0
    • S stenmic

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

      @stenmic

      //var requestDelete = require('request');
      var options = {
          url: 'http://192.168.xxx.xxx/server/files/gcodes/' + String(getState("0_userdata.0.3D-Drucker_Nextion.Loesche_Job").val),
          method: 'DELETE'
      };
      httpGet(options, function  (error, response) {
          log('error: ' + error);
          log('response: ' + JSON.stringify(response));
          log('body: ' + response.data);
      });
      
      

      danke, aber es geht leider nicht (eventuell wegen dem "DELETE")

      javascript.0 2024-06-01 16:13:12.470	error	at process.processImmediate (node:internal/timers:476:21)
      javascript.0 2024-06-01 16:13:12.470	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:641:29)
      javascript.0 2024-06-01 16:13:12.470	error	at Object.<anonymous> (script.js.3D-Drucker.Printjob:34:11)
      javascript.0 2024-06-01 16:13:12.470	error	at httpGet (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1183:20)
      javascript.0 2024-06-01 16:13:12.470	error	at getHttpRequestConfig (/opt/iobroker/node_modules/iobroker.javascript/lib/tools.js:151:21)
      javascript.0 2024-06-01 16:13:12.469	error	at new NodeError (node:internal/errors:405:5)
      javascript.0 2024-06-01 16:13:12.470	error	at delete2 (script.js.3D-Drucker.Printjob:11:5)
      javascript.0 2024-06-01 16:13:12.470	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1399:38)
      javascript.0 2024-06-01 16:13:12.470	error	at Immediate.<anonymous> (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8489:62)
      javascript.0 2024-06-01 16:13:12.469	error	script.js.3D-Drucker.Printjob: TypeError [ERR_INVALID_URL]: Invalid URL
      javascript.0 2024-06-01 16:13:12.469	error	at new URL (node:internal/url:676:13)
      
      M Online
      M Online
      MCU
      wrote on last edited by MCU
      #4

      @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);
      });
       
      
      

      NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
      Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

      haus-automatisierungH 1 Reply Last reply
      0
      • M 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-automatisierungH Online
        haus-automatisierungH Online
        haus-automatisierung
        Developer Most Active
        wrote on last edited by
        #5

        @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

        🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
        🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
        📚 Meine inoffizielle ioBroker Dokumentation

        M S HomoranH 3 Replies Last reply
        0
        • haus-automatisierungH haus-automatisierung

          @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 Online
          M Online
          MCU
          wrote on last edited by
          #6

          @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));
                  }
              });
          
          

          NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
          Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

          S 1 Reply Last reply
          2
          • haus-automatisierungH haus-automatisierung

            @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

            S Offline
            S Offline
            stenmic
            wrote on last edited by stenmic
            #7

            @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
            0
            • M MCU

              @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 Offline
              S Offline
              stenmic
              wrote on last edited by
              #8

              @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 :ok_hand:

              1 Reply Last reply
              0
              • haus-automatisierungH haus-automatisierung

                @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

                HomoranH Do not disturb
                HomoranH Do not disturb
                Homoran
                Global Moderator Administrators
                wrote on last edited by
                #9

                @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!

                kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                haus-automatisierungH 1 Reply Last reply
                0
                • HomoranH Homoran

                  @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-automatisierungH Online
                  haus-automatisierungH Online
                  haus-automatisierung
                  Developer Most Active
                  wrote on last edited by
                  #10

                  @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?

                  🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                  🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                  📚 Meine inoffizielle ioBroker Dokumentation

                  1 Reply Last reply
                  1
                  • HomoranH Do not disturb
                    HomoranH Do not disturb
                    Homoran
                    Global Moderator Administrators
                    wrote on last edited by
                    #11

                    @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.

                    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                    haus-automatisierungH 1 Reply Last reply
                    0
                    • HomoranH Homoran

                      @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-automatisierungH Online
                      haus-automatisierungH Online
                      haus-automatisierung
                      Developer Most Active
                      wrote on last edited by
                      #12

                      @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?

                      🧑‍🎓 Autor des beliebten ioBroker-Master-Kurses
                      🎥 Tutorials rund um das Thema DIY-Smart-Home: https://haus-automatisierung.com/
                      📚 Meine inoffizielle ioBroker Dokumentation

                      HomoranH 1 Reply Last reply
                      0
                      • haus-automatisierungH haus-automatisierung

                        @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?

                        HomoranH Do not disturb
                        HomoranH Do not disturb
                        Homoran
                        Global Moderator Administrators
                        wrote on last edited by Homoran
                        #13

                        @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!

                        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        559

                        Online

                        32.5k

                        Users

                        81.7k

                        Topics

                        1.3m

                        Posts
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                        ioBroker Community 2014-2025
                        logo
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Home
                        • Recent
                        • Tags
                        • Unread 0
                        • Categories
                        • Unreplied
                        • Popular
                        • GitHub
                        • Docu
                        • Hilfe