mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pico: small refactor (#9857)
This commit is contained in:

committed by
GitHub

parent
8ccdae6188
commit
dee4904bee
@ -19,7 +19,7 @@ fn hello_response() string {
|
||||
return 'Hello, World!'
|
||||
}
|
||||
|
||||
fn callback(req picohttpparser.Request, mut res picohttpparser.Response) {
|
||||
fn callback(data voidptr, req picohttpparser.Request, mut res picohttpparser.Response) {
|
||||
if picohttpparser.cmpn(req.method, 'GET ', 4) {
|
||||
if picohttpparser.cmp(req.path, '/t') {
|
||||
res.http_ok()
|
||||
@ -39,6 +39,7 @@ fn callback(req picohttpparser.Request, mut res picohttpparser.Response) {
|
||||
} else {
|
||||
res.http_405()
|
||||
}
|
||||
res.end()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Reference in New Issue
Block a user