Skip to content

Commit b4789fb

Browse files
committed
FEAT: added example how to server humans.txt data from the test server
1 parent 5fa5b83 commit b4789fb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/tests/test-httpd.r3

+17
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ system/options/log/httpd: 3 ; for verbose output
2121
; make sure that there is the directory for logs
2222
make-dir/deep %httpd-root/logs/
2323

24+
humans.txt: {
25+
__
26+
( )
27+
||
28+
||
29+
___|""|__.._
30+
/____________\
31+
\____________/~~~> http://github.com/oldes/
32+
}
33+
2434
http-server/config/actor 8081 [
2535
;- Main server configuration
2636

@@ -59,6 +69,13 @@ http-server/config/actor 8081 [
5969
ctx/out/content: "hello"
6070
; request processing will stop with response 200 serving the plain text content
6171
]
72+
%humans.txt [
73+
;@@ https://codeburst.io/all-about-humans-humans-txt-actually-f571d37f92d2
74+
;-- serving the content directly from the memory
75+
ctx/out/status: 200
76+
ctx/out/header/Content-Type: "text/plain; charset=UTF-8"
77+
ctx/out/content: humans.txt
78+
]
6279
]
6380
]
6481
On-Post-Received: func [ctx [object!]][

0 commit comments

Comments
 (0)