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: README.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,97 @@ int main() {
106
106
2.**401 "missing-api-key" error**: Make sure you call `config->setApiKey(utility::conversions::to_string_t("api_key"), utility::conversions::to_string_t("YOUR_KEY"))` before creating the DefaultAPI instance.
107
107
3.**Wrong API class**: Use `DefaultAPI` for server-side authenticated requests, `PublicAPI` for client-side/public requests.
108
108
109
+
## Making API Calls: Synchronous vs Asynchronous
110
+
111
+
All API methods in this SDK return `pplx::task<std::shared_ptr<ResponseType>>` from the C++ REST SDK. This gives you flexibility in how you handle API responses.
112
+
113
+
### Synchronous Calls with `.get()`
114
+
115
+
Use `.get()` to block the calling thread until the request completes and retrieve the result synchronously:
116
+
117
+
```cpp
118
+
auto config = std::make_shared<org::openapitools::client::api::ApiConfiguration>();
0 commit comments