Process local http request (#599)
* Local http? * option utils * Fix for hanging web app * Lint fix --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
fae875845a
commit
f3f9327c1c
8 files changed
+123
-11
No files matched your search
@@ -195,6 +195,22 @@ namespace Http
|
||||
stats = stats + " Bytes" + Stri(m.total_in) + " in," + Stri(m.total_out) + " out"
|
||||
return stats
|
||||
end function
|
||||
|
||||
function ProcessRequestLocal(method as string, uri as string, headers as object, body as string) as object
|
||||
LogInfo(`Processing request locally ${method} ${uri}`)
|
||||
request = new HttpRequest()
|
||||
request.FromParsedData(method, uri, headers, body)
|
||||
|
||||
response = new HttpResponse(request, m, m.settings)
|
||||
response.Process({})
|
||||
|
||||
return {
|
||||
http_code: response.http_code
|
||||
headers: response.headers
|
||||
body: response.body_buffer
|
||||
}
|
||||
end function
|
||||
|
||||
end class
|
||||
|
||||
end namespace
|
||||
Reference in new issue
Block a user