balancer/playground
WebAssembly lab

A SMALL HOOK. A DIFFERENT REQUEST.

See your request change.

Write AssemblyScript, run it as WebAssembly, and inspect the request it produces.

Ready when you are
01

Request

INPUT

Keep the leading ? out. The query stays unchanged when you set a path.

INITIAL HTTP GROUP100
Fixed

Group switches are assumed to be authorized. Just test what your code changes.

02

AssemblyScript

TS-like
TShandler.tsonRequest
Request API 4 fields · 2 setters
request.methodrequest.authority // hostnamerequest.pathrequest.query
setPath("/new/path")switchHttpGroup(102)

Getters read the original request. Setters apply together when the handler succeeds.

AssemblyScript is TypeScript-like. Browser/Node APIs and built-in RegExp are unavailable.

03

Result

OUTPUT

Your next request starts here.

Run your code to see the resulting path, query and HTTP group.