Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get请求加参数后匹配不到路由 #12

Open
urionz opened this issue Aug 1, 2023 · 1 comment
Open

get请求加参数后匹配不到路由 #12

urionz opened this issue Aug 1, 2023 · 1 comment

Comments

@urionz
Copy link

urionz commented Aug 1, 2023

fun startHTTPServer(context:Context, androidServer: AndroidServer) {
    androidServer
        .get("/ping") {request, response ->
            response.setBodyText("pong")
        }
        .start()
}
curl -v 127.0.0.1:8080/ping?id=1&name=test

response {"nameValuePairs":{"status":404,"reason":"404 Not Found"}}
@urionz
Copy link
Author

urionz commented Aug 1, 2023

解决方案:path值作为路由

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant