mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-04-03 22:03:33 +03:00
Merge pull request #493 from EmmanuelVella/query-parameters
Add query parameters in sandbox request URL
This commit is contained in:
commit
d6777b881b
1 changed files with 9 additions and 4 deletions
|
@ -261,7 +261,12 @@
|
|||
return $('<div>').text(text).html();
|
||||
};
|
||||
|
||||
var displayFinalUrl = function(xhr, method, url, container) {
|
||||
var displayFinalUrl = function(xhr, method, url, data, container) {
|
||||
if ('GET' == method && jQuery(data).size()) {
|
||||
var separator = url.indexOf('?') >= 0 ? '&' : '?';
|
||||
url = url + separator + decodeURIComponent(jQuery.param(data));
|
||||
}
|
||||
|
||||
container.text(method + ' ' + url);
|
||||
};
|
||||
|
||||
|
@ -294,8 +299,8 @@
|
|||
container.text(text);
|
||||
};
|
||||
|
||||
var displayResponse = function(xhr, method, url, result_container) {
|
||||
displayFinalUrl(xhr, method, url, $('.url', result_container));
|
||||
var displayResponse = function(xhr, method, url, data, result_container) {
|
||||
displayFinalUrl(xhr, method, url, data, $('.url', result_container));
|
||||
displayProfilerUrl(xhr, $('.profiler-link', result_container), $('.profiler', result_container));
|
||||
displayResponseData(xhr, $('.response', result_container));
|
||||
displayResponseHeaders(xhr, $('.headers', result_container));
|
||||
|
@ -478,7 +483,7 @@
|
|||
}
|
||||
},
|
||||
complete: function(xhr) {
|
||||
displayResponse(xhr, method, url, result_container);
|
||||
displayResponse(xhr, method, url, data, result_container);
|
||||
|
||||
// and enable them back
|
||||
$('input:not(.content-type), button', $(self)).removeAttr('disabled');
|
||||
|
|
Loading…
Add table
Reference in a new issue