mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Add query parameters in sandbox request URL
This commit is contained in:
parent
0d45e7f186
commit
f9d713f9b4
@ -261,7 +261,12 @@
|
|||||||
return $('<div>').text(text).html();
|
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);
|
container.text(method + ' ' + url);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -294,8 +299,8 @@
|
|||||||
container.text(text);
|
container.text(text);
|
||||||
};
|
};
|
||||||
|
|
||||||
var displayResponse = function(xhr, method, url, result_container) {
|
var displayResponse = function(xhr, method, url, data, result_container) {
|
||||||
displayFinalUrl(xhr, method, url, $('.url', result_container));
|
displayFinalUrl(xhr, method, url, data, $('.url', result_container));
|
||||||
displayProfilerUrl(xhr, $('.profiler-link', result_container), $('.profiler', result_container));
|
displayProfilerUrl(xhr, $('.profiler-link', result_container), $('.profiler', result_container));
|
||||||
displayResponseData(xhr, $('.response', result_container));
|
displayResponseData(xhr, $('.response', result_container));
|
||||||
displayResponseHeaders(xhr, $('.headers', result_container));
|
displayResponseHeaders(xhr, $('.headers', result_container));
|
||||||
@ -478,7 +483,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: function(xhr) {
|
complete: function(xhr) {
|
||||||
displayResponse(xhr, method, url, result_container);
|
displayResponse(xhr, method, url, data, result_container);
|
||||||
|
|
||||||
// and enable them back
|
// and enable them back
|
||||||
$('input:not(.content-type), button', $(self)).removeAttr('disabled');
|
$('input:not(.content-type), button', $(self)).removeAttr('disabled');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user