Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 503 Bytes

File metadata and controls

29 lines (20 loc) · 503 Bytes

A microservice for sales tax rate lookup

Build

cargo build --target wasm32-wasi --release

Run

wasmedge target/wasm32-wasi/release/sales_tax_rate_lookup.wasm

Test

Run the following from another terminal.

$ curl http://localhost:8001/find_rate -X POST -d "78701"
0.0825

If the zip code is not in the source CSV file, the microservice will return a default tax rate of 0.08.

$ curl http://localhost:8001/find_rate -X POST -d "12345"
0.08