File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle
Resources/views/Collector Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ CHANGELOG
77 * Add support for the ` QUERY ` HTTP method in the profiler
88 * Add support for Server-Sent Events / ` EventSource ` requests in the debug toolbar
99 * Add support for displaying the application runner class
10+ * Add cURL copy paste button in the Request/Response tab
1011
11127.3
1213---
Original file line number Diff line number Diff line change 232232 <p >No content</p >
233233 </div >
234234 {% endif %}
235+
236+ <h3 >Retry command</h3 >
237+ {% set curlCommand = ' curl -X ' ~ collector .method ~ ' ' ~ profile .url %}
238+ {% for name , value in collector .requestheaders %}
239+ {% set curlCommand = curlCommand ~ (' -H "%s: %s"' | format (name , value )) %}
240+ {% endfor %}
241+ {% if collector .content != ' ' %}
242+ {% set curlCommand = curlCommand ~ " --data '" ~ (collector .isJsonRequest ? collector .content | json_encode : collector .content ) ~ " '" %}
243+ {% endif %}
244+ <div class =" sf-tabs" >
245+ <div class =" tab" >
246+ <h3 class =" tab-title" >cURL</h3 >
247+ <div class =" tab-content" >
248+ <div class =" card" >
249+ <button class =" btn btn-sm hidden" title =" Copy as cURL" data-clipboard-text =" {{ curlCommand }}" >Copy as cURL</button >
250+ <pre class =" break-long-words" >{{ curlCommand }}</pre >
251+ </div >
252+ </div >
253+ </div >
254+ </div >
235255 </div >
236256 </div >
237257
You can’t perform that action at this time.
0 commit comments