Wrap getQuery, update uWS
This commit is contained in:
parent
bf8fa0dfcf
commit
e2c49e5a4f
@ -100,7 +100,19 @@ struct HttpRequestWrapper {
|
||||
Isolate *isolate = args.GetIsolate();
|
||||
auto *req = getHttpRequest(args);
|
||||
if (req) {
|
||||
std::string_view query = req->getQuery();
|
||||
std::string_view query;
|
||||
|
||||
/* Do we have a key argument? */
|
||||
if (args.Length() == 1) {
|
||||
NativeString keyString(isolate, args[0]);
|
||||
if (keyString.isInvalid(args)) {
|
||||
return;
|
||||
}
|
||||
|
||||
query = req->getQuery(keyString.getString());
|
||||
} else {
|
||||
query = req->getQuery();
|
||||
}
|
||||
|
||||
args.GetReturnValue().Set(String::NewFromUtf8(isolate, query.data(), NewStringType::kNormal, query.length()).ToLocalChecked());
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 270308f10446c55b4a8c3c6ada62f81e77e1917c
|
||||
Subproject commit 7c61122a1a930b72667193363ad39d45f1a7b435
|
Loading…
Reference in New Issue
Block a user