Skip to content

Commit 5cd9cb3

Browse files
committed
updated readme
1 parent be1ad58 commit 5cd9cb3

24 files changed

+93
-30
lines changed

README.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,62 @@ HttpServer 采用 Java NIO.2 模型进行开发,使用了 `java.nio.channels.A
210210

211211
### 3.1.1 接收
212212

213-
- 支持 `GET``POST` 请求
214-
215-
<img src="./docs/image/feature_get.png" alt="GET" width="250"> <img src="./docs/image/feature_post.png" alt="POST" width="250">
216-
217-
相关测试: [LoginSystemTests](./src/test/java/loginsystemtests/LoginSystemTests.java)
213+
- 支持 `GET``POST` 请求,相关测试: [LoginSystemTests](./src/test/java/loginsystemtests/LoginSystemTests.java)
214+
215+
<img src="./docs/image/feature_get.png" alt="GET" width="300"> <img src="./docs/image/feature_post.png" alt="POST" width="300">
218216

219217
- 支持以下状态码:
220-
- 200 OK
221-
-
218+
- 200 OK<br/>
219+
<img src="./docs/image/feature_status_200.png" alt="200" width="300">
220+
221+
- 301 Moved Permanently<br/>
222+
<img src="./docs/image/feature_status_301.png" alt="301" width="300">
223+
224+
- 302 Found<br/>
225+
<img src="./docs/image/feature_status_302.png" alt="302" width="300">
226+
227+
- 304 Not Modified<br/>
228+
<img src="./docs/image/feature_status_304.png" alt="304" width="300">
229+
230+
- 404 Not Found<br/>
231+
<img src="./docs/image/feature_status_404.png" alt="404" width="300">
232+
233+
- 405 Method Not Allowed<br/>
234+
<img src="./docs/image/feature_status_405.png" alt="405" width="300">
235+
236+
- 500 Internal Server Error<br/>
237+
<img src="./docs/image/feature_status_500.png" alt="500" width="300">
238+
239+
- 505 HTTP Version Not Supported<br/>
240+
<img src="./docs/image/feature_status_505.png" alt="505" width="300">
241+
242+
- 支持长连接 (Keep-Alive) ,相关测试:[KeepAliveTest](./src/test/java/servertests/KeepAliveTest.java)<br/>
243+
<img src="./docs/image/feature_keep_alive.png" alt="Keep-Alive">
244+
245+
- 支持MIME类型: <br/> 已测试过的全部类型: [mime.json](./src/main/resources/mime.json)<br/>理论支持任意文件传输
246+
- HTML: `text/html`<br/>
247+
<img src="./docs/image/feature_mime_html.png" alt="HTML" width="500">
248+
249+
- png: `image/png`<br/>
250+
<img src="./docs/image/feature_mime_png.png" alt="PNG" width="500">
251+
252+
- mp4: `video/mp4`<br/>
253+
<img src="./docs/image/feature_mime_mp4.png" alt="MP4" width="500">
254+
255+
- svg: `image/svg+xml`<br/>
256+
<img src="./docs/image/feature_mime_svg.png" alt="SVG" width="500">
257+
258+
- 编写了注册、登录、状态保持系统
259+
260+
1. 用户注册<br/>
261+
<img src="./docs/image/feature_loginsys_1.png" alt="loginsys_1" width="500">
262+
2. 检查登录状态<br/>
263+
<img src="./docs/image/feature_loginsys_2.png" alt="loginsys_2" width="500">
264+
3. 登出<br/>
265+
<img src="./docs/image/feature_loginsys_3.png" alt="loginsys_3" width="500">
266+
4. 检查登录状态<br/>
267+
<img src="./docs/image/feature_loginsys_4.png" alt="loginsys_4" width="500">
268+
5. 登录<br/>
269+
<img src="./docs/image/feature_loginsys_5.png" alt="loginsys_5" width="500">
222270

223271
## 3.2 HttpClient

docs/image/feature_keep_alive.png

990 KB
Loading

docs/image/feature_loginsys_1.png

1.09 MB
Loading

docs/image/feature_loginsys_2.png

1.33 MB
Loading

docs/image/feature_loginsys_3.png

1.22 MB
Loading

docs/image/feature_loginsys_4.png

1.31 MB
Loading

docs/image/feature_loginsys_5.png

1.26 MB
Loading

docs/image/feature_mime_html.png

1.76 MB
Loading

docs/image/feature_mime_mp4.png

1.52 MB
Loading

docs/image/feature_mime_png.png

1.35 MB
Loading

0 commit comments

Comments
 (0)