You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/http-certification/assets/README.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ fn post_upgrade() {
76
76
77
77
## Canister endpoints
78
78
79
-
There is only one canister endpoint in this example to serve assets, `http_request` query endpoint. The `serve_metrics` and `serve_asset` functions will be covered in a later section.
79
+
There is only one canister endpoint in this example to serve assets, the `http_request` query endpoint. The `http_request` handler uses two auxiliary functions, `serve_metrics` and `serve_asset`, which are covered in a later section.
80
80
81
81
```rust
82
82
#[query]
@@ -164,14 +164,13 @@ The `certify_all_assets` function performs the following steps:
Copy file name to clipboardexpand all lines: examples/http-certification/custom-assets/README.md
+53-85
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,6 @@ The lifecycle hooks are set up similarly to the JSON API.
67
67
```rust
68
68
#[init]
69
69
fninit() {
70
-
prepare_cel_exprs();
71
70
certify_all_assets();
72
71
}
73
72
@@ -79,30 +78,17 @@ fn post_upgrade() {
79
78
80
79
## CEL Expressions
81
80
82
-
CEL expressions are also stored similarly to the [JSON API example](https://internetcomputer.org/docs/current/developer-docs/http-compatible-canisters/serving-json-over-http).
81
+
The CEL expression definition is simpler in the case of assets compared to the [JSON API example](https://internetcomputer.org/docs/current/developer-docs/http-compatible-canisters/serving-json-over-http) as the same CEL expression is used for every asset, including the fallback response.
0 commit comments