httpbinx 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- httpbinx/VERSION +1 -1
- httpbinx/routers/dynamicdata.py +1 -1
- httpbinx/routers/redirects.py +2 -2
- {httpbinx-1.3.0.dist-info → httpbinx-1.3.2.dist-info}/METADATA +35 -3
- {httpbinx-1.3.0.dist-info → httpbinx-1.3.2.dist-info}/RECORD +8 -8
- {httpbinx-1.3.0.dist-info → httpbinx-1.3.2.dist-info}/LICENSE +0 -0
- {httpbinx-1.3.0.dist-info → httpbinx-1.3.2.dist-info}/WHEEL +0 -0
- {httpbinx-1.3.0.dist-info → httpbinx-1.3.2.dist-info}/top_level.txt +0 -0
httpbinx/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
httpbinx/routers/dynamicdata.py
CHANGED
@@ -159,7 +159,7 @@ async def link_page(
|
|
159
159
|
body += f'{i} '
|
160
160
|
else:
|
161
161
|
body += link.format(
|
162
|
-
href=f'/
|
162
|
+
href=f'/links/{n}/{i}', # TODO how to use router.url_path_for?
|
163
163
|
text=i
|
164
164
|
)
|
165
165
|
return HTMLResponse(content=html.format(body=body))
|
httpbinx/routers/redirects.py
CHANGED
@@ -91,10 +91,10 @@ async def relative_redirect_n_times(
|
|
91
91
|
):
|
92
92
|
resp = Response(status_code=status.HTTP_302_FOUND)
|
93
93
|
if n == 1:
|
94
|
-
resp.headers['Location'] = request.url_for('get')
|
94
|
+
resp.headers['Location'] = str(request.url_for('get'))
|
95
95
|
return resp
|
96
96
|
redirect_name = relative_redirect_n_times.__name__
|
97
|
-
resp.headers['Location'] = request.url_for(redirect_name, n=n - 1)
|
97
|
+
resp.headers['Location'] = str(request.url_for(redirect_name, n=n - 1))
|
98
98
|
return resp
|
99
99
|
|
100
100
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: httpbinx
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.2
|
4
4
|
Summary: HTTP Request & Response Service, written in Python + FastAPI.
|
5
5
|
Home-page: https://github.com/imleowoo/httpbinx
|
6
6
|
Author: Leo
|
@@ -28,9 +28,13 @@ Requires-Dist: jinja2
|
|
28
28
|
Requires-Dist: brotli
|
29
29
|
Requires-Dist: python-multipart
|
30
30
|
|
31
|
-

|
31
|
+
](https://raw.githubusercontent.com/imleowoo/httpbinx/main/httpbinx/static/images/httpbinx_cover.png)
|
32
|
+
|
33
|
+
[](https://github.com/postmanlabs/httpbin)
|
34
|
+

|
32
35
|
|
33
36
|
# httpbinx
|
37
|
+
|
34
38
|
HTTP Request & Response Service, written in Python + FastAPI.
|
35
39
|
|
36
40
|
## Reference project
|
@@ -39,10 +43,28 @@ A [Kenneth Reitz](http://kennethreitz.org/bitcoin) Project. See https://github.
|
|
39
43
|
|
40
44
|
## Quick Start
|
41
45
|
|
46
|
+
## Installation
|
47
|
+
|
48
|
+
### PyPI
|
49
|
+
|
50
|
+
**[httpbinx](https://pypi.org/project/httpbinx/)** is available on PyPI
|
51
|
+
|
52
|
+
```shell
|
53
|
+
$ pip install httpbinx
|
54
|
+
```
|
55
|
+
|
56
|
+
### Source Code
|
57
|
+
|
58
|
+
```shell
|
59
|
+
$ git clone https://github.com/imleowoo/httpbinx.git
|
60
|
+
$ python setup.py install # or `pip install .`
|
61
|
+
```
|
62
|
+
|
63
|
+
## Run it
|
64
|
+
|
42
65
|
### Run directly
|
43
66
|
|
44
67
|
```shell
|
45
|
-
$ python setup.py install
|
46
68
|
$ uvicorn httpbinx:app --host=0.0.0.0 --port=80
|
47
69
|
```
|
48
70
|
|
@@ -52,3 +74,13 @@ $ uvicorn httpbinx:app --host=0.0.0.0 --port=80
|
|
52
74
|
$ docker pull leowoo/httpbinx:latest
|
53
75
|
$ docker run -p 80:80 --name httpbinx leowoo/httpbinx:latest
|
54
76
|
```
|
77
|
+
|
78
|
+
### It starts running
|
79
|
+
|
80
|
+
```text
|
81
|
+
INFO: Started server process [17044]
|
82
|
+
INFO: Waiting for application startup.
|
83
|
+
INFO: Application startup complete.
|
84
|
+
INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
|
85
|
+
...
|
86
|
+
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
httpbinx/VERSION,sha256=
|
1
|
+
httpbinx/VERSION,sha256=MxWJcqU4d7Qhz-JZi42TyrFpljpJZLRe6InoU0mXkBg,6
|
2
2
|
httpbinx/__init__.py,sha256=hPPEFgOAqXD22JamTP9uGK42qngDmwmM35RVg2varDA,289
|
3
3
|
httpbinx/constants.py,sha256=aJay1yI313fLxfFXgBPLE6p_UABlHq1KGEcdO7Nf2FQ,906
|
4
4
|
httpbinx/helpers.py,sha256=-fJyFbToQ0QwRY5UZ3Bkx7Ui_nj_bk8Wd4qKRtYGIsg,3787
|
@@ -10,10 +10,10 @@ httpbinx/routers/__init__.py,sha256=ebIczIRV0SVNX992e_UT-JjLiclDgbOl_rQNLDfiovw,
|
|
10
10
|
httpbinx/routers/anything.py,sha256=KtNMHx4aEGQS6fc21YdHszorm1_gPIfpYuCkImgQFCA,564
|
11
11
|
httpbinx/routers/auth.py,sha256=nGZA1aQtrS2B74vM2NORHSWMXf5q25JC2J63hAO2_Us,717
|
12
12
|
httpbinx/routers/cookies.py,sha256=TB3ADXXg0kgZX5nE1QlrVk1mKXjdFAMJ7iMfd8kfMBc,2341
|
13
|
-
httpbinx/routers/dynamicdata.py,sha256=
|
13
|
+
httpbinx/routers/dynamicdata.py,sha256=sZYX9L3pBXRlPZgs5MkDiltqom9-3OtnkknUymHrQDc,6596
|
14
14
|
httpbinx/routers/httpmethods.py,sha256=X9YPADi9D6FQnybJWyXc5BTDErgFZ5Xa4OIy7OKAifQ,1531
|
15
15
|
httpbinx/routers/images.py,sha256=JBZ08Ez2gmXiGfA-jNXN3SaQzvQMmFkRrX9E0f_k3fk,2261
|
16
|
-
httpbinx/routers/redirects.py,sha256=
|
16
|
+
httpbinx/routers/redirects.py,sha256=aEWL1VcEaqzAz-nr7fPgKw1_iA_JCtbzS6syB0Urs4E,3023
|
17
17
|
httpbinx/routers/responseformats.py,sha256=sqRLzSFjUmN5B9urbMVR7X_AydqvuT1pvHGIXyzhedw,4996
|
18
18
|
httpbinx/routers/statuscodes.py,sha256=gLyX_YNj2FKld_nzvidVjLMyRqDXMDepSyp68XG7ThA,1681
|
19
19
|
httpbinx/routers/inspection/__init__.py,sha256=OMPci9p6uK9L6uFKQKbIqOn-r5MndCWSqlw-bJsUE3E,166
|
@@ -31,8 +31,8 @@ httpbinx/templates/index.html,sha256=9--gnqsRkQjSqiZr-Ljn2gr_b3Ddr8Zx91lFk7o91Vw
|
|
31
31
|
httpbinx/templates/moby.html,sha256=4lCnl11TgB7Yw1JxeAoVodo2qKU4MyfLcG3qJSs0DUg,3742
|
32
32
|
httpbinx/templates/sample.xml,sha256=UcHibo5ClF0e3nhCbgLlQmUw33Rwnd5Rr6IYIqNQumg,522
|
33
33
|
httpbinx/templates/trackingscripts.html,sha256=M5P33NOYlYaoOEDPzaJqKWPJCPxSx2zZsYWR9DT_D5E,583
|
34
|
-
httpbinx-1.3.
|
35
|
-
httpbinx-1.3.
|
36
|
-
httpbinx-1.3.
|
37
|
-
httpbinx-1.3.
|
38
|
-
httpbinx-1.3.
|
34
|
+
httpbinx-1.3.2.dist-info/LICENSE,sha256=t6oZPzEcm1CsBu9sB_8JYTc5rSOUhyQUee5qvAg4o-A,1060
|
35
|
+
httpbinx-1.3.2.dist-info/METADATA,sha256=qNOcfxoCsJmq4JLCxXUbBWeY_atCPObjKaZZjQ6SXYI,2309
|
36
|
+
httpbinx-1.3.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
37
|
+
httpbinx-1.3.2.dist-info/top_level.txt,sha256=zg7vMSUefYOTEUftRjOOmG3W5kfueHlHWG7zr46q1jI,9
|
38
|
+
httpbinx-1.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|