chg: [RestClient] use http_method value from template if available

pull/9314/head
Jeroen Pinoy 2023-10-04 17:32:58 +02:00
parent b33720aa46
commit bcac8674fa
No known key found for this signature in database
GPG Key ID: DF33A50B8E4EE081
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ var debounceTimerUpdate;
var previously_selected_template = $('#ServerUrl').data('urlWithoutParam')
if (selected_template !== '' && allValidApis[selected_template] !== undefined) {
$('#template_description').show();
$('#ServerMethod').val('POST');
if(allValidApis[selected_template].http_method !== undefined){
$('#ServerMethod').val(allValidApis[selected_template].http_method);
} else {
$('#ServerMethod').val('POST');
}
var server_url_changed = $('#ServerUrl').val() != allValidApis[selected_template].url;
$('#ServerUrl')
.val(allValidApis[selected_template].url)