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
results in the execution of a GET request that includes the header `version: 2`.
118
118
119
-
Note: The Cookie, Header, Param, and Query annotations all accept parameters such as name, style, and explode as defined
120
-
by OpenAPI.
119
+
HTTP headers conventionally use kebab-case names, which are not valid Python identifiers. Pass the actual header name as the first argument to `Header`:
will send a GET request that includes the header Cookie: key=value.
145
155
156
+
## Optional parameters
157
+
158
+
Query, header, and cookie parameters can all be made optional by using `T | None` and a default of `None`. Parameters set to `None` are omitted from the request entirely.
The wrapped function is called first without the cursor parameter. After each call, `get_cursor` is invoked on the result. Iteration stops when `get_cursor` returns `None`.
22
+
23
+
24
+
## Shortcut
25
+
26
+
Since an API typically uses the same paging pattern for all its operations, it's practical to define a project-level helper:
27
+
28
+
```python
29
+
from lapidary.runtime import iter_pages as _iter_pages
0 commit comments