Skip to content

Commit 883ee44

Browse files
author
Damian Martinez Gelabert
committed
Fix issues with query parameters
1 parent c68fd47 commit 883ee44

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

dist/scripts/api-console.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,18 +2397,16 @@
23972397
}
23982398
}
23992399

2400-
o.baseUrl = options.uri;
2400+
o.baseUrl = options.url;
24012401

24022402
if (!RAML.Utils.isEmpty(queryParams)) {
2403-
var separator = (options.uri.match('\\?') ? '&' : '?');
2403+
var separator = (options.url.match('\\?') ? '&' : '?');
24042404

2405-
o.baseUrl = options.uri + separator;
2406-
o.uri = options.uri + separator + jQuery.param(queryParams, true);
2405+
o.baseUrl = options.url + separator;
24072406
o.url = options.url + separator + jQuery.param(queryParams, true);
24082407
}
24092408

24102409
if (!RAML.Settings.disableProxy && RAML.Settings.proxy) {
2411-
o.uri = RAML.Settings.proxy + o.uri;
24122410
o.url = RAML.Settings.proxy + o.url;
24132411
}
24142412

@@ -5260,8 +5258,8 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache)
52605258
" <div class=\"raml-console-sidebar-request-metadata\" ng-class=\"{'raml-console-is-active':showRequestMetadata}\">\n" +
52615259
"\n" +
52625260
" <div class=\"raml-console-sidebar-row\">\n" +
5263-
" <div ng-if=\"requestOptions.uri\">\n" +
5264-
" <h3 class=\"raml-console-sidebar-response-head raml-console-sidebar-response-head-pre\">Request URI</h3>\n" +
5261+
" <div ng-if=\"requestOptions.url\">\n" +
5262+
" <h3 class=\"raml-console-sidebar-response-head raml-console-sidebar-response-head-pre\">Request URL</h3>\n" +
52655263
" <div class=\"raml-console-sidebar-response-item\">\n" +
52665264
" <p class=\"raml-console-sidebar-response-metadata raml-console-sidebar-request-url\">{{requestOptions.baseUrl}}<span ng-repeat=\"(key, value) in parameters\"><span ng-hide=\"$first\">&amp;</span><b>{{key}}</b>=<i>{{value[0]}}</i></span>\n" +
52675265
" </p>\n" +

src/app/directives/sidebar.tpl.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ <h3 class="raml-console-sidebar-head raml-console-sidebar-head-expand">
115115
<div class="raml-console-sidebar-request-metadata" ng-class="{'raml-console-is-active':showRequestMetadata}">
116116

117117
<div class="raml-console-sidebar-row">
118-
<div ng-if="requestOptions.uri">
119-
<h3 class="raml-console-sidebar-response-head raml-console-sidebar-response-head-pre">Request URI</h3>
118+
<div ng-if="requestOptions.url">
119+
<h3 class="raml-console-sidebar-response-head raml-console-sidebar-response-head-pre">Request URL</h3>
120120
<div class="raml-console-sidebar-response-item">
121121
<p class="raml-console-sidebar-response-metadata raml-console-sidebar-request-url">{{requestOptions.baseUrl}}<span ng-repeat="(key, value) in parameters"><span ng-hide="$first">&amp;</span><b>{{key}}</b>=<i>{{value[0]}}</i></span>
122122
</p>

src/common/client/request.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,16 @@
8686
}
8787
}
8888

89-
o.baseUrl = options.uri;
89+
o.baseUrl = options.url;
9090

9191
if (!RAML.Utils.isEmpty(queryParams)) {
92-
var separator = (options.uri.match('\\?') ? '&' : '?');
92+
var separator = (options.url.match('\\?') ? '&' : '?');
9393

94-
o.baseUrl = options.uri + separator;
95-
o.uri = options.uri + separator + jQuery.param(queryParams, true);
94+
o.baseUrl = options.url + separator;
9695
o.url = options.url + separator + jQuery.param(queryParams, true);
9796
}
9897

9998
if (!RAML.Settings.disableProxy && RAML.Settings.proxy) {
100-
o.uri = RAML.Settings.proxy + o.uri;
10199
o.url = RAML.Settings.proxy + o.url;
102100
}
103101

0 commit comments

Comments
 (0)