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: README.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,47 +1,57 @@
1
-
# HTTPlex - test and debug HTTP requests
1
+
# HTTPlex - a simple HTTP request & response service
2
2
3
3
HTTPlex is an Elixir-based web service that provides a simple HTTP request and response service. It is inspired from [httpbin](https://httpbin.org/) and helps developers test and debug HTTP requests.
4
4
5
5
## Features
6
+
6
7
The project is built using Elixir and the Phoenix framework. It defines a controller (`HTTPlexWeb.APIController`) that handles various HTTP endpoints:
7
8
8
9
HTTP Methods:
10
+
9
11
-`index/2`: Welcome message
10
12
-`get/2`, `post/2`, `put/2`, `patch/2`, `delete/2`: Return request info for respective HTTP methods
11
13
-`anything/2`: Accepts and returns data for any HTTP method
-`get_cookies/2`: Returns all cookies sent with the request
58
69
-`set_cookies/2`, `set_cookie/2`: Set multiple or a single cookie
59
70
-`delete_cookies/2`: Deletes specified cookies
60
71
61
72
Encoding:
73
+
62
74
-`brotli/2`: Returns Brotli-encoded data
63
75
-`deflate/2`: Returns Deflate-encoded data
64
76
-`gzip/2`: Returns GZip-encoded data
65
77
-`encoding_utf8/2`: Returns UTF-8 encoded text
66
78
67
79
Caching:
80
+
68
81
-`cache/2`: Tests caching headers
69
82
-`cache_control/2`: Sets Cache-Control header with specified max-age
70
83
-`etag/2`: Tests ETag functionality
@@ -76,6 +89,7 @@ Each function or group of functions corresponds to different features or test sc
76
89
To use HTTPlex, send HTTP requests to the appropriate endpoints. The service will respond with JSON data (in most cases) containing the requested information or performing the specified action.
77
90
78
91
For example:
92
+
79
93
-`GET /ip` will return your IP address.
80
94
-`POST /post` with some data will echo back information about your POST request.
81
95
-`GET /status/404` will respond with a 404 status code.
@@ -86,8 +100,8 @@ This service is particularly useful for testing HTTP clients, debugging web appl
86
100
87
101
To start your Phoenix server:
88
102
89
-
* Run `mix setup` to install and setup dependencies
90
-
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
103
+
- Run `mix setup` to install and setup dependencies
104
+
- Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
91
105
92
106
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
93
107
@@ -99,15 +113,16 @@ The theme is available as open source under the terms of the [MIT License](https
99
113
100
114
## Contributing
101
115
102
-
Bug reports and pull requests are welcome on GitHub at https://github.com/abhinavs/httplex.
116
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/abhinavs/httplex>.
103
117
104
118
## Other Projects
105
119
106
120
If you like HTTPlex, do check out my other projects
107
-
*[soopr](https://www.soopr.co) - a tool that supports you in content marketing
108
-
*[ping](https://www.apicblocks.com/ping) - monitor your websites's uptime
109
-
*[annexr](https://www.annexr.com) - chat based search for your website.
110
-
*[apicagent](https://www.apicagent.com) - a FREE API that extracts device details from user-agent string
111
121
122
+
-[soopr](https://www.soopr.co) - a tool that supports you in content marketing
123
+
-[ping](https://www.apicblocks.com/ping) - monitor your websites's uptime
124
+
-[annexr](https://www.annexr.com) - chat based search for your website.
125
+
-[apicagent](https://www.apicagent.com) - a FREE API that extracts device details from user-agent string
126
+
-[cookie](https://github.com/abhinavs/cookie) - an open source landing website with supporting pages and integrated blog
112
127
113
-
✨⚡You can read more about me on my [blog](https://www.abhinav.co/about/) or follow me on Twitter - [@abhinav](https://twitter.com/abhinav)
128
+
✨⚡You can read more about me on my [blog](https://www.abhinav.co/about/) or follow me on Twitter - [@abhinav](https://twitter.com/abhinav)
0 commit comments