@@ -110,12 +110,12 @@ void Router::Register(hv::HttpService& router) {
110110 router.POST (" /json" , Handler::json);
111111
112112 // Content-Type: multipart/form-data
113- // bin/curl -v http://ip:port/form -F " user=admin pswd=123456"
113+ // bin/curl -v http://ip:port/form -F ' user=admin' -F ' pswd=123456'
114114 router.POST (" /form" , Handler::form);
115115
116116 // curl -v http://ip:port/test -H "Content-Type:application/x-www-form-urlencoded" -d 'bool=1&int=123&float=3.14&string=hello'
117117 // curl -v http://ip:port/test -H "Content-Type:application/json" -d '{"bool":true,"int":123,"float":3.14,"string":"hello"}'
118- // bin/curl -v http://ip:port/test -F 'bool=1 int=123 float=3.14 string=hello'
118+ // bin/curl -v http://ip:port/test -F 'bool=1' -F ' int=123' -F ' float=3.14' -F ' string=hello'
119119 router.POST (" /test" , Handler::test);
120120
121121 // Content-Type: application/grpc
@@ -130,7 +130,10 @@ void Router::Register(hv::HttpService& router) {
130130 // curl -v http://ip:port/login -H "Content-Type:application/json" -d '{"username":"admin","password":"123456"}'
131131 router.POST (" /login" , Handler::login);
132132
133- // curl -v http://ip:port/upload -d "hello,world!"
134- // curl -v http://ip:port/upload -F " file=@LICENSE"
133+ // curl -v http://ip:port/upload -d '@LICENSE'
134+ // curl -v http://ip:port/upload -F ' file=@LICENSE'
135135 router.POST (" /upload" , Handler::upload);
136+
137+ // SSE: Server Send Events
138+ router.GET (" /SSE" , Handler::sse);
136139}
0 commit comments