Belajar nyomot2 kodingan rust.
Belajar membuat service(s) pakai Actix Web.
Coba nyomot dari Getting Started:
- GET
/
(OK) - POST
/echo
(OK) - GET
/hey
(OK)
Belajar ngoding tanpa ngoding, dengan auto generate koding dari OpenAPI Spec.
Coba nyomot dari Swagg:
- Generate from OpenAPI Spec. (OK)
cargo-swagg ./openapi.yaml --out-file ./src/api.rs
- Generate from OpenAPI Spec. Pet Store (Err)
cargo-swagg ./petstore.yaml --out-file ./src/petstore.rs
- Percantik hasil luaran koding (OK)
rustfmt ./src/api.rs
Belajar ngeformat output service jadi JSON
Coba nyomot dari Examples:
- Output JSON
{ message: 'SUCCESS'}
(OK)
Belajar membuat handling default route yang tidak ada
Coba nyomot dari Error 404 unfound routes Actix-web
{ message: NOT FOUND }
(OK)
Belajar mengeluarkan file html
Coba nyomot dari What's the easiest way to get the HTML output of an actix-web endpoint handler to be rendered properly?
- GET
/docs
(OK)
Belajar buat uuid
Coba nyomot dari Crate uuid
- GET
/uuid
(OK)
Belajar buat token JWT
Coba nyomot dari JWT authentication in Rust
- GET
/token
(OK)
Selanjutnya nyomot apa?
- Decode JWT in Authorization Header as Bearer Token
- Handling Error(s)
- Upload file
- Websocket
- Apapun yang asik