You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.rst
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,18 @@ The following example is of external sources.
51
51
52
52
To display the response outside of the tabbed interface, then don't include it in the ``http:example`` directive, but instead list it separately.
53
53
54
-
.. note::
55
-
Currently only external sources support a separate display of the HTTP response.
56
-
The users of sphinxcontrib.httpexample would appreciate a contribution to add this feature as indicated in `issue 120 <https://github.com/collective/sphinxcontrib-httpexample/issues/120>`_.
54
+
For inline sources, use ``code-block`` with the ``http-response`` lexer.
57
55
58
-
For external sources, use ``literalinclude`` with the ``http`` lexer.
56
+
.. code-block:: rst
57
+
58
+
.. http:example:: space separated list of tools
59
+
A required inline source of a raw plain text HTTP request example.
60
+
This is required.
61
+
62
+
.. code-block:: http
63
+
An optional inline source of a raw plain text HTTP response example.
64
+
65
+
For external sources, use ``literalinclude`` with either the ``http`` or ``http-response`` lexer.
"description": "Congratulations! You have successfully installed Plone.",
281
+
"effective": null,
282
+
"exclude_from_nav": false,
283
+
"expires": null,
284
+
"id": "front-page",
285
+
"language": "",
286
+
"modified": "2016-01-21T01:24:11+00:00",
287
+
"parent": {
288
+
"@id": "http://localhost:8080/Plone",
289
+
"@type": "Plone Site",
290
+
"description": "",
291
+
"title": "Plone site"
292
+
},
293
+
"relatedItems": [],
294
+
"review_state": "private",
295
+
"rights": "",
296
+
"subjects": [],
297
+
"table_of_contents": null,
298
+
"text": {
299
+
"content-type": "text/plain",
300
+
"data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.",
"description": "Congratulations! You have successfully installed Plone.",
335
+
"effective": null,
336
+
"exclude_from_nav": false,
337
+
"expires": null,
338
+
"id": "front-page",
339
+
"language": "",
340
+
"modified": "2016-01-21T01:24:11+00:00",
341
+
"parent": {
342
+
"@id": "http://localhost:8080/Plone",
343
+
"@type": "Plone Site",
344
+
"description": "",
345
+
"title": "Plone site"
346
+
},
347
+
"relatedItems": [],
348
+
"review_state": "private",
349
+
"rights": "",
350
+
"subjects": [],
351
+
"table_of_contents": null,
352
+
"text": {
353
+
"content-type": "text/plain",
354
+
"data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.",
355
+
"encoding": "utf-8"
356
+
},
357
+
"title": "Welcome to Plone"
358
+
}
359
+
360
+
244
361
HTTP ``POST``
245
362
^^^^^^^^^^^^^
246
363
@@ -409,9 +526,8 @@ Separate response
409
526
^^^^^^^^^^^^^^^^^
410
527
The following example is exactly the same as the previous one, except the HTTP response is displayed separately from the tabbed interface.
411
528
412
-
.. note::
413
-
Currently only external sources support a separate display of the HTTP response.
414
-
The users of sphinxcontrib.httpexample would appreciate a contribution to add this feature as indicated in `issue 120 <https://github.com/collective/sphinxcontrib-httpexample/issues/120>`_.
529
+
For external sources, use ``literalinclude`` with either the ``http`` or ``http-response`` lexer.
0 commit comments