Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 565 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 565 Bytes

KeyValue Counter

This actor accepts http GET requests, and increments a counter whose name is based on the url path. Each unique url is associated a unique counter. The result is returned in a JSON payload as follows:

{
  "counter": 12
}

This actor makes use of the HTTP server (wasmcloud:httpserver) capability and the key-value store capability (wasmcloud:keyvalue).

As usual, it is worth noting that this actor does not know where its HTTP server comes from, nor does it know which key-value implementation the host runtime has provided.