Skip to content

Commit 00b5d84

Browse files
committed
feat: Initial urllib3 example implementation
1 parent 5179f20 commit 00b5d84

8 files changed

Lines changed: 552 additions & 31 deletions

File tree

docs/index.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Example
7878

7979
.. code-block:: rst
8080
81-
.. http:example:: curl wget httpie requests plone-client
81+
.. http:example:: curl wget httpie requests urllib3 plone-client
8282
8383
POST /Plone/folder HTTP/1.1
8484
Host: localhost:8080
@@ -99,7 +99,7 @@ Example
9999
Rendering
100100
=========
101101

102-
.. http:example:: curl wget httpie requests plone-client
102+
.. http:example:: curl wget httpie requests urllib3 plone-client
103103
104104
POST /Plone/folder HTTP/1.1
105105
Host: localhost:8080
@@ -188,7 +188,12 @@ sphinxcontrib-httpexample is compatible with the following tab libraries.
188188

189189
.. tab-item:: requests
190190

191-
.. http:example-block:: wget
191+
.. http:example-block:: requests
192+
:request: ../tests/fixtures/001.request.txt
193+
194+
.. tab-item:: urllib3
195+
196+
.. http:example-block:: urllib3
192197
:request: ../tests/fixtures/001.request.txt
193198

194199
.. tab-item:: response

docs/usage.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Markup
2727

2828
.. code-block:: rst
2929
30-
.. http:example:: curl wget httpie requests plone-client
30+
.. http:example:: curl wget httpie requests urllib3 plone-client
3131
3232
GET /Plone/front-page HTTP/1.1
3333
Host: localhost:8080
@@ -79,7 +79,7 @@ Markup
7979
Result
8080
``````
8181

82-
.. http:example:: curl wget httpie requests plone-client
82+
.. http:example:: curl wget httpie requests urllib3 plone-client
8383
8484
GET /Plone/front-page HTTP/1.1
8585
Host: localhost:8080
@@ -138,7 +138,7 @@ Markup
138138

139139
.. code-block:: rst
140140
141-
.. http:example:: curl wget httpie requests plone-client
141+
.. http:example:: curl wget httpie requests urllib3 plone-client
142142
143143
GET /Plone/front-page HTTP/1.1
144144
Host: localhost:8080
@@ -191,7 +191,7 @@ Markup
191191
Result
192192
``````
193193

194-
.. http:example:: curl wget httpie requests plone-client
194+
.. http:example:: curl wget httpie requests urllib3 plone-client
195195
196196
GET /Plone/front-page HTTP/1.1
197197
Host: localhost:8080
@@ -253,7 +253,7 @@ Markup
253253

254254
.. code-block:: rst
255255
256-
.. http:example:: curl wget httpie requests plone-client
256+
.. http:example:: curl wget httpie requests urllib3 plone-client
257257
258258
GET /Plone/front-page HTTP/1.1
259259
Host: localhost:8080
@@ -307,7 +307,7 @@ Markup
307307
Result
308308
``````
309309

310-
.. http:example:: curl wget httpie requests plone-client
310+
.. http:example:: curl wget httpie requests urllib3 plone-client
311311
312312
GET /Plone/front-page HTTP/1.1
313313
Host: localhost:8080
@@ -369,7 +369,7 @@ Markup
369369

370370
.. code-block:: rst
371371
372-
.. http:example:: curl wget httpie requests plone-client
372+
.. http:example:: curl wget httpie requests urllib3 plone-client
373373
374374
POST /Plone/folder HTTP/1.1
375375
Host: localhost:8080
@@ -389,7 +389,7 @@ Markup
389389
Result
390390
``````
391391

392-
.. http:example:: curl wget httpie requests plone-client
392+
.. http:example:: curl wget httpie requests urllib3 plone-client
393393
394394
POST /Plone/folder HTTP/1.1
395395
Host: localhost:8080
@@ -418,7 +418,7 @@ Markup
418418

419419
.. code-block:: rst
420420
421-
.. http:example:: curl wget httpie requests plone-client
421+
.. http:example:: curl wget httpie requests urllib3 plone-client
422422
423423
PATCH /Plone/folder/my-document HTTP/1.1
424424
Host: localhost:8080
@@ -437,7 +437,7 @@ Markup
437437
Result
438438
``````
439439

440-
.. http:example:: curl wget httpie requests plone-client
440+
.. http:example:: curl wget httpie requests urllib3 plone-client
441441
442442
PATCH /Plone/folder/my-document HTTP/1.1
443443
Host: localhost:8080
@@ -465,7 +465,7 @@ Markup
465465

466466
.. code-block:: rst
467467
468-
.. http:example:: curl wget httpie requests plone-client
468+
.. http:example:: curl wget httpie requests urllib3 plone-client
469469
470470
GET /items?user_id=12&user_id=13 HTTP/1.1
471471
Host: localhost
@@ -482,7 +482,7 @@ Markup
482482
Result
483483
``````
484484

485-
.. http:example:: curl wget httpie requests plone-client
485+
.. http:example:: curl wget httpie requests urllib3 plone-client
486486
487487
GET /items?user_id=12&user_id=13 HTTP/1.1
488488
Host: localhost
@@ -510,14 +510,14 @@ Markup
510510

511511
.. code-block:: rst
512512
513-
.. http:example:: curl wget httpie requests plone-client
513+
.. http:example:: curl wget httpie requests urllib3 plone-client
514514
:request: ../tests/fixtures/001.request.txt
515515
:response: ../tests/fixtures/001.response.txt
516516
517517
Result
518518
``````
519519

520-
.. http:example:: curl wget httpie requests plone-client
520+
.. http:example:: curl wget httpie requests urllib3 plone-client
521521
:request: ../tests/fixtures/001.request.txt
522522
:response: ../tests/fixtures/001.response.txt
523523

@@ -534,7 +534,7 @@ Markup
534534

535535
.. code-block:: rst
536536
537-
.. http:example:: curl wget httpie requests plone-client
537+
.. http:example:: curl wget httpie requests urllib3 plone-client
538538
:request: ../tests/fixtures/001.request.txt
539539
540540
.. literalinclude:: ../tests/fixtures/001.response.txt
@@ -543,7 +543,7 @@ Markup
543543
Result
544544
``````
545545

546-
.. http:example:: curl wget httpie requests plone-client
546+
.. http:example:: curl wget httpie requests urllib3 plone-client
547547
:request: ../tests/fixtures/001.request.txt
548548

549549
.. literalinclude:: ../tests/fixtures/001.response.txt
@@ -558,14 +558,14 @@ Markup
558558

559559
.. code-block:: rst
560560
561-
.. http:example:: curl wget httpie requests plone-client
561+
.. http:example:: curl wget httpie requests urllib3 plone-client
562562
:request: ../tests/fixtures/002.request.txt
563563
:response: ../tests/fixtures/002.response.txt
564564
565565
Result
566566
``````
567567

568-
.. http:example:: curl wget httpie requests plone-client
568+
.. http:example:: curl wget httpie requests urllib3 plone-client
569569
:request: ../tests/fixtures/002.request.txt
570570
:response: ../tests/fixtures/002.response.txt
571571

@@ -579,14 +579,14 @@ Markup
579579

580580
.. code-block:: rst
581581
582-
.. http:example:: curl wget httpie requests plone-client
582+
.. http:example:: curl wget httpie requests urllib3 plone-client
583583
:request: ../tests/fixtures/003.request.txt
584584
:response: ../tests/fixtures/003.response.txt
585585
586586
Result
587587
``````
588588

589-
.. http:example:: curl wget httpie requests plone-client
589+
.. http:example:: curl wget httpie requests urllib3 plone-client
590590
:request: ../tests/fixtures/003.request.txt
591591
:response: ../tests/fixtures/003.response.txt
592592

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ exclude = ["tests"]
4040

4141
[dependency-groups]
4242
dev = [
43+
"urllib3",
4344
"black>=25.1.0",
4445
"coverage>=7.7.1",
4546
"isort>=6.0.1",

0 commit comments

Comments
 (0)