diff --git a/packages/node_modules/@node-red/nodes/core/io/21-httprequest.html b/packages/node_modules/@node-red/nodes/core/io/21-httprequest.html index 1fd10af9c..4c2a7c0d6 100644 --- a/packages/node_modules/@node-red/nodes/core/io/21-httprequest.html +++ b/packages/node_modules/@node-red/nodes/core/io/21-httprequest.html @@ -49,12 +49,13 @@
- - +
@@ -102,7 +103,7 @@ url:{value:"",validate:function(v) { return (v.trim().length === 0) || (v.indexOf("://") === -1) || (v.trim().indexOf("http") === 0)} }, tls: {type:"tls-config",required: false}, proxy: {type:"http proxy",required: false}, - authType: {value: "basic"} + authType: {value: ""} }, credentials: { user: {type:"text"}, @@ -130,7 +131,7 @@ $(".node-input-useAuth-row").show(); // Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic' if (!$('#node-input-authType').val()) { - $('#node-input-authType').val('basic'); + $("#node-input-authType-select").val('basic').trigger("change"); } } else { $(".node-input-useAuth-row").hide(); @@ -139,12 +140,14 @@ $('#node-input-password').val(''); } }); - $("#node-input-authType").change(function() { - if ($(this).val() == "basic" || $(this).val() == "digest") { + $("#node-input-authType-select").change(function() { + var val = $(this).val(); + $("#node-input-authType").val(val); + if (val === "basic" || val === "digest") { $(".node-input-basic-row").show(); $('#node-span-password').show(); $('#node-span-token').hide(); - } else if ($(this).val() == "bearer") { + } else if (val === "bearer") { $(".node-input-basic-row").hide(); $('#node-span-password').hide(); $('#node-span-token').show(); @@ -158,8 +161,9 @@ $(".node-input-paytoqs-row").hide(); } }); - if (this.credentials.user || this.credentials.has_password) { + if (this.authType) { $('#node-input-useAuth').prop('checked', true); + $("#node-input-authType-select").val(this.authType); } else { $('#node-input-useAuth').prop('checked', false); }