diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index 946892d..d258cb4 100755 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -366,7 +366,7 @@ $('.pane.sandbox form').submit(function() { var url = $(this).attr('action'), - method = $(this).attr('method'), + method = $('[name="header_method"]', this).val(), self = this, params = {}, formData = new FormData(), @@ -377,8 +377,6 @@ if (method === 'ANY') { method = 'POST'; - } else if (method.indexOf('|') !== -1) { - method = method.split('|').sort().pop(); } // set requestFormat diff --git a/Resources/views/method.html.twig b/Resources/views/method.html.twig index c4399c7..cee9d54 100644 --- a/Resources/views/method.html.twig +++ b/Resources/views/method.html.twig @@ -201,7 +201,7 @@ {% if app.request is not null and data.https and app.request.secure != data.https %} Please reload the documentation using the scheme {% if data.https %}HTTPS{% else %}HTTP{% endif %} if you want to use the sandbox. {% else %} -
+
Input {% if data.requirements is defined %} @@ -247,6 +247,18 @@
+ {% set methods = data.method|upper|split('|') %} + {% if methods|length > 1 %} + Method + + {% else %} + + {% endif %} + Headers {% if acceptType %}