Skip to content

Commit 51e49a7

Browse files
authored
Updating to latest API naming convention (microsoft#356)
1 parent ce0d05b commit 51e49a7

40 files changed

+306
-306
lines changed

Include/httpClient/httpClient.h

+67-67
Large diffs are not rendered by default.

Include/httpClient/httpProvider.h

+27-27
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
/// </remarks>
2121
typedef void
2222
(CALLBACK* HCCallPerformFunction)(
23-
_In_ hc_call_handle_t call,
23+
_In_ HCCallHandle call,
2424
_Inout_ XAsyncBlock* asyncBlock,
2525
_In_opt_ void* context,
26-
_In_ hc_perform_env env
26+
_In_ HCPerformEnv env
2727
);
2828

2929
/// <summary>
@@ -70,7 +70,7 @@ STDAPI HCGetHttpCallPerformFunction(
7070
/// <param name="context">the context pointer attached to this call object</param>
7171
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
7272
STDAPI HCHttpCallGetContext(
73-
_In_ hc_call_handle_t call,
73+
_In_ HCCallHandle call,
7474
_In_ void** context
7575
) HC_NOEXCEPT;
7676

@@ -81,7 +81,7 @@ STDAPI HCHttpCallGetContext(
8181
/// <param name="context">the context pointer attached to this call object</param>
8282
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
8383
STDAPI HCHttpCallSetContext(
84-
_In_ hc_call_handle_t call,
84+
_In_ HCCallHandle call,
8585
_In_ void* context
8686
) HC_NOEXCEPT;
8787

@@ -98,7 +98,7 @@ STDAPI HCHttpCallSetContext(
9898
/// <param name="url">UTF-8 encoded URL for the HTTP call</param>
9999
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
100100
STDAPI HCHttpCallRequestGetUrl(
101-
_In_ hc_call_handle_t call,
101+
_In_ HCCallHandle call,
102102
_Outptr_ const char** method,
103103
_Outptr_ const char** url
104104
) HC_NOEXCEPT;
@@ -111,7 +111,7 @@ STDAPI HCHttpCallRequestGetUrl(
111111
/// <param name="requestBodySize">The request body bytes size in bytes of the HTTP call</param>
112112
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
113113
STDAPI HCHttpCallRequestGetRequestBodyBytes(
114-
_In_ hc_call_handle_t call,
114+
_In_ HCCallHandle call,
115115
_Outptr_result_bytebuffer_maybenull_(*requestBodySize) const uint8_t** requestBodyBytes,
116116
_Out_ uint32_t* requestBodySize
117117
) HC_NOEXCEPT;
@@ -123,7 +123,7 @@ STDAPI HCHttpCallRequestGetRequestBodyBytes(
123123
/// <param name="requestBody">The UTF-8 encoded request body of the HTTP call</param>
124124
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
125125
STDAPI HCHttpCallRequestGetRequestBodyString(
126-
_In_ hc_call_handle_t call,
126+
_In_ HCCallHandle call,
127127
_Outptr_ const char** requestBody
128128
) HC_NOEXCEPT;
129129

@@ -135,7 +135,7 @@ STDAPI HCHttpCallRequestGetRequestBodyString(
135135
/// <param name="headerValue">UTF-8 encoded request header value for the HTTP call</param>
136136
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
137137
STDAPI HCHttpCallRequestGetHeader(
138-
_In_ hc_call_handle_t call,
138+
_In_ HCCallHandle call,
139139
_In_z_ const char* headerName,
140140
_Out_ const char** headerValue
141141
) HC_NOEXCEPT;
@@ -147,7 +147,7 @@ STDAPI HCHttpCallRequestGetHeader(
147147
/// <param name="numHeaders">the number of request headers in the HTTP call</param>
148148
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
149149
STDAPI HCHttpCallRequestGetNumHeaders(
150-
_In_ hc_call_handle_t call,
150+
_In_ HCCallHandle call,
151151
_Out_ uint32_t* numHeaders
152152
) HC_NOEXCEPT;
153153

@@ -161,7 +161,7 @@ STDAPI HCHttpCallRequestGetNumHeaders(
161161
/// <param name="headerValue">UTF-8 encoded request header value for the HTTP call</param>
162162
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
163163
STDAPI HCHttpCallRequestGetHeaderAtIndex(
164-
_In_ hc_call_handle_t call,
164+
_In_ HCCallHandle call,
165165
_In_ uint32_t headerIndex,
166166
_Out_ const char** headerName,
167167
_Out_ const char** headerValue
@@ -175,7 +175,7 @@ STDAPI HCHttpCallRequestGetHeaderAtIndex(
175175
/// <param name="retryAllowed">If retry is allowed for this HTTP call</param>
176176
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
177177
STDAPI HCHttpCallRequestGetRetryAllowed(
178-
_In_opt_ hc_call_handle_t call,
178+
_In_opt_ HCCallHandle call,
179179
_Out_ bool* retryAllowed
180180
) HC_NOEXCEPT;
181181

@@ -187,7 +187,7 @@ STDAPI HCHttpCallRequestGetRetryAllowed(
187187
/// <param name="retryAfterCacheId">ID number of this REST endpoint used to cache the Retry-After header for fast fail. 1-1000 are reserved for XSAPI</param>
188188
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
189189
STDAPI HCHttpCallRequestGetRetryCacheId(
190-
_In_ hc_call_handle_t call,
190+
_In_ HCCallHandle call,
191191
_Out_ uint32_t* retryAfterCacheId
192192
) HC_NOEXCEPT;
193193

@@ -199,7 +199,7 @@ STDAPI HCHttpCallRequestGetRetryCacheId(
199199
/// <param name="timeoutInSeconds">the timeout for this HTTP call.</param>
200200
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
201201
STDAPI HCHttpCallRequestGetTimeout(
202-
_In_opt_ hc_call_handle_t call,
202+
_In_opt_ HCCallHandle call,
203203
_Out_ uint32_t* timeoutInSeconds
204204
) HC_NOEXCEPT;
205205

@@ -229,7 +229,7 @@ STDAPI HCHttpCallRequestGetTimeout(
229229
/// <param name="retryDelayInSeconds">The retry delay in seconds</param>
230230
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
231231
STDAPI HCHttpCallRequestGetRetryDelay(
232-
_In_opt_ hc_call_handle_t call,
232+
_In_opt_ HCCallHandle call,
233233
_In_ uint32_t* retryDelayInSeconds
234234
) HC_NOEXCEPT;
235235

@@ -252,7 +252,7 @@ STDAPI HCHttpCallRequestGetRetryDelay(
252252
/// <param name="timeoutWindowInSeconds">The timeout window in seconds</param>
253253
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
254254
STDAPI HCHttpCallRequestGetTimeoutWindow(
255-
_In_opt_ hc_call_handle_t call,
255+
_In_opt_ HCCallHandle call,
256256
_Out_ uint32_t* timeoutWindowInSeconds
257257
) HC_NOEXCEPT;
258258

@@ -270,7 +270,7 @@ STDAPI HCHttpCallRequestGetTimeoutWindow(
270270
/// <param name="enableAssertsForThrottling">True if assert are enabled if throttled</param>
271271
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
272272
STDAPI HCHttpCallRequestGetAssertsForThrottling(
273-
_In_opt_ hc_call_handle_t call,
273+
_In_opt_ HCCallHandle call,
274274
_Out_ bool* enableAssertsForThrottling
275275
) HC_NOEXCEPT;
276276

@@ -287,7 +287,7 @@ STDAPI HCHttpCallRequestGetAssertsForThrottling(
287287
/// <param name="bodySize">The length in bytes of the body being set.</param>
288288
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
289289
STDAPI HCHttpCallResponseSetResponseBodyBytes(
290-
_In_ hc_call_handle_t call,
290+
_In_ HCCallHandle call,
291291
_In_reads_bytes_(bodySize) const uint8_t* bodyBytes,
292292
_In_ size_t bodySize
293293
) HC_NOEXCEPT;
@@ -299,7 +299,7 @@ STDAPI HCHttpCallResponseSetResponseBodyBytes(
299299
/// <param name="statusCode">the HTTP status code of the HTTP call response</param>
300300
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
301301
STDAPI HCHttpCallResponseSetStatusCode(
302-
_In_ hc_call_handle_t call,
302+
_In_ HCCallHandle call,
303303
_In_ uint32_t statusCode
304304
) HC_NOEXCEPT;
305305

@@ -311,7 +311,7 @@ STDAPI HCHttpCallResponseSetStatusCode(
311311
/// <param name="platformNetworkErrorCode">The platform specific network error code of the HTTP call to be used for logging / debugging</param>
312312
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
313313
STDAPI HCHttpCallResponseSetNetworkErrorCode(
314-
_In_ hc_call_handle_t call,
314+
_In_ HCCallHandle call,
315315
_In_ HRESULT networkErrorCode,
316316
_In_ uint32_t platformNetworkErrorCode
317317
) HC_NOEXCEPT;
@@ -324,7 +324,7 @@ STDAPI HCHttpCallResponseSetNetworkErrorCode(
324324
/// <param name="headerValue">UTF-8 encoded response header value for the HTTP call</param>
325325
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
326326
STDAPI HCHttpCallResponseSetHeader(
327-
_In_ hc_call_handle_t call,
327+
_In_ HCCallHandle call,
328328
_In_z_ const char* headerName,
329329
_In_z_ const char* headerValue
330330
) HC_NOEXCEPT;
@@ -349,7 +349,7 @@ typedef HRESULT
349349
(CALLBACK* HCWebSocketConnectFunction)(
350350
_In_z_ const char* uri,
351351
_In_z_ const char* subProtocol,
352-
_In_ hc_websocket_handle_t websocket,
352+
_In_ HCWebsocketHandle websocket,
353353
_Inout_ XAsyncBlock* asyncBlock
354354
);
355355

@@ -362,7 +362,7 @@ typedef HRESULT
362362
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
363363
typedef HRESULT
364364
(CALLBACK* HCWebSocketSendMessageFunction)(
365-
_In_ hc_websocket_handle_t websocket,
365+
_In_ HCWebsocketHandle websocket,
366366
_In_z_ const char* message,
367367
_Inout_ XAsyncBlock* asyncBlock
368368
);
@@ -375,7 +375,7 @@ typedef HRESULT
375375
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
376376
typedef HRESULT
377377
(CALLBACK* HCWebSocketDisconnectFunction)(
378-
_In_ hc_websocket_handle_t websocket,
378+
_In_ HCWebsocketHandle websocket,
379379
_In_ HCWebSocketCloseStatus closeStatus
380380
);
381381

@@ -421,7 +421,7 @@ HCGetWebSocketFunctions(
421421
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
422422
STDAPI
423423
HCWebSocketGetProxyUri(
424-
_In_ hc_websocket_handle_t websocket,
424+
_In_ HCWebsocketHandle websocket,
425425
_Out_ const char** proxyUri
426426
) HC_NOEXCEPT;
427427

@@ -434,7 +434,7 @@ HCWebSocketGetProxyUri(
434434
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
435435
STDAPI
436436
HCWebSocketGetHeader(
437-
_In_ hc_websocket_handle_t websocket,
437+
_In_ HCWebsocketHandle websocket,
438438
_In_z_ const char* headerName,
439439
_Out_ const char** headerValue
440440
) HC_NOEXCEPT;
@@ -447,7 +447,7 @@ HCWebSocketGetHeader(
447447
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
448448
STDAPI
449449
HCWebSocketGetNumHeaders(
450-
_In_ hc_websocket_handle_t websocket,
450+
_In_ HCWebsocketHandle websocket,
451451
_Out_ uint32_t* numHeaders
452452
) HC_NOEXCEPT;
453453

@@ -462,7 +462,7 @@ HCWebSocketGetNumHeaders(
462462
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
463463
STDAPI
464464
HCWebSocketGetHeaderAtIndex(
465-
_In_ hc_websocket_handle_t websocket,
465+
_In_ HCWebsocketHandle websocket,
466466
_In_ uint32_t headerIndex,
467467
_Out_ const char** headerName,
468468
_Out_ const char** headerValue

Include/httpClient/mock.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// <param name="call">The handle of the mock HTTP call</param>
1818
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
1919
STDAPI HCMockCallCreate(
20-
_Out_ hc_mock_call_handle* call
20+
_Out_ HCMockCallHandle* call
2121
) HC_NOEXCEPT;
2222

2323

@@ -58,7 +58,7 @@ STDAPI HCMockCallCreate(
5858
/// </param>
5959
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
6060
STDAPI HCMockAddMock(
61-
_In_ hc_mock_call_handle call,
61+
_In_ HCMockCallHandle call,
6262
_In_opt_z_ const char* method,
6363
_In_opt_z_ const char* url,
6464
_In_reads_bytes_opt_(requestBodySize) const uint8_t* requestBodyBytes,
@@ -84,7 +84,7 @@ STDAPI HCMockClearMocks() HC_NOEXCEPT;
8484
/// <param name="bodySize">The length in bytes of the body being set.</param>
8585
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
8686
STDAPI HCMockResponseSetResponseBodyBytes(
87-
_In_ hc_mock_call_handle call,
87+
_In_ HCMockCallHandle call,
8888
_In_reads_bytes_(bodySize) const uint8_t* bodyBytes,
8989
_In_ uint32_t bodySize
9090
) HC_NOEXCEPT;
@@ -96,7 +96,7 @@ STDAPI HCMockResponseSetResponseBodyBytes(
9696
/// <param name="statusCode">the HTTP status code of the HTTP call response</param>
9797
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
9898
STDAPI HCMockResponseSetStatusCode(
99-
_In_ hc_mock_call_handle call,
99+
_In_ HCMockCallHandle call,
100100
_In_ uint32_t statusCode
101101
) HC_NOEXCEPT;
102102

@@ -108,7 +108,7 @@ STDAPI HCMockResponseSetStatusCode(
108108
/// <param name="platformNetworkErrorCode">The platform specific network error code of the HTTP call to be used for logging / debugging</param>
109109
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, or E_FAIL.</returns>
110110
STDAPI HCMockResponseSetNetworkErrorCode(
111-
_In_ hc_mock_call_handle call,
111+
_In_ HCMockCallHandle call,
112112
_In_ HRESULT networkErrorCode,
113113
_In_ uint32_t platformNetworkErrorCode
114114
) HC_NOEXCEPT;
@@ -121,7 +121,7 @@ STDAPI HCMockResponseSetNetworkErrorCode(
121121
/// <param name="headerValue">UTF-8 encoded response header value for the HTTP call</param>
122122
/// <returns>Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_OUTOFMEMORY, or E_FAIL.</returns>
123123
STDAPI HCMockResponseSetHeader(
124-
_In_ hc_mock_call_handle call,
124+
_In_ HCMockCallHandle call,
125125
_In_z_ const char* headerName,
126126
_In_z_ const char* headerValue
127127
) HC_NOEXCEPT;

Include/httpClient/pal.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ typedef struct _LIST_ENTRY {
376376
#define E_HC_CONNECT_ALREADY_CALLED MAKE_E_HC(0x5005)
377377
#define E_HC_NO_NETWORK MAKE_E_HC(0x5006)
378378

379-
typedef uint32_t hc_memory_type;
380-
typedef struct HC_WEBSOCKET* hc_websocket_handle_t;
381-
typedef struct HC_CALL* hc_call_handle_t;
382-
typedef struct HC_CALL* hc_mock_call_handle;
383-
typedef struct HC_PERFORM_ENV* hc_perform_env;
379+
typedef uint32_t HCMemoryType;
380+
typedef struct HC_WEBSOCKET* HCWebsocketHandle;
381+
typedef struct HC_CALL* HCCallHandle;
382+
typedef struct HC_CALL* HCMockCallHandle;
383+
typedef struct HC_PERFORM_ENV* HCPerformEnv;
384384

385385
// Error codes from https://www.iana.org/assignments/websocket/websocket.xml#close-code-number
386386
typedef enum HCWebSocketCloseStatus

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ libHttpClient provides a platform abstraction layer for HTTP and WebSocket, and
3636
1. Optionally call HCMemSetFunctions() to control memory allocations
3737
1. Call HCInitialize()
3838
1. Optionally call HCSettingsSet*()
39-
1. Call HCHttpCallCreate() to create a new hc_call_handle_t
40-
1. Call HCHttpCallRequestSet*() to prepare the hc_call_handle_t
41-
1. Call HCHttpCallPerform() to perform an HTTP call using the hc_call_handle_t.
39+
1. Call HCHttpCallCreate() to create a new HCCallHandle
40+
1. Call HCHttpCallRequestSet*() to prepare the HCCallHandle
41+
1. Call HCHttpCallPerform() to perform an HTTP call using the HCCallHandle.
4242
1. The perform call is asynchronous, so the work will be done on a background thread which calls DispatchAsyncQueue( ..., AsyncQueueCallbackType_Work ). The results will return to the callback on the thread that calls DispatchAsyncQueue( ..., AsyncQueueCallbackType_Completion ).
43-
1. Call HCHttpCallResponseGet*() to get the HTTP response of the hc_call_handle_t
44-
1. Call HCHttpCallCloseHandle() to cleanup the hc_call_handle_t
43+
1. Call HCHttpCallResponseGet*() to get the HTTP response of the HCCallHandle
44+
1. Call HCHttpCallCloseHandle() to cleanup the HCCallHandle
4545
1. Repeat 4-8 for each new HTTP call
4646
1. Call HCCleanup() at shutdown before your memory manager set in step 1 is shutdown
4747

Samples/UWP-CustomHttpImplWithCurl/MainPage.xaml.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ win32_handle g_completionReadyHandle;
5656
#define TICKS_PER_SECOND 10000000i64
5757

5858
void STDAPIVCALLTYPE PerformCallWithCurl(
59-
_In_ hc_call_handle_t call,
59+
_In_ HCCallHandle call,
6060
_Inout_ AsyncBlock* asyncBlock
6161
);
6262

@@ -223,7 +223,7 @@ void HttpTestApp::MainPage::StartBackgroundThread()
223223
}
224224
}
225225

226-
std::vector<std::vector<std::string>> ExtractAllHeaders(_In_ hc_call_handle_t call)
226+
std::vector<std::vector<std::string>> ExtractAllHeaders(_In_ HCCallHandle call)
227227
{
228228
uint32_t numHeaders = 0;
229229
HCHttpCallResponseGetNumHeaders(call, &numHeaders);
@@ -295,7 +295,7 @@ void HttpTestApp::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::
295295
std::string requestMethod = to_utf8string(TextboxMethod->Text->Data());
296296
std::string requestUrl = to_utf8string(TextboxURL->Text->Data());
297297

298-
hc_call_handle_t call = nullptr;
298+
HCCallHandle call = nullptr;
299299
HCHttpCallCreate(&call);
300300
HCHttpCallRequestSetUrl(call, requestMethod.c_str(), requestUrl.c_str());
301301
HCHttpCallRequestSetRequestBodyString(call, requestBody.c_str());
@@ -321,7 +321,7 @@ void HttpTestApp::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::
321321
std::string responseString;
322322
std::string errMessage;
323323

324-
hc_call_handle_t call = static_cast<hc_call_handle_t>(asyncBlock->context);
324+
HCCallHandle call = static_cast<HCCallHandle>(asyncBlock->context);
325325
HCHttpCallResponseGetNetworkErrorCode(call, &errCode, &platErrCode);
326326
HCHttpCallResponseGetStatusCode(call, &statusCode);
327327
HCHttpCallResponseGetResponseString(call, &str);

Samples/UWP-CustomHttpImplWithCurl/PerformWithCurl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::wstring to_wstring(const std::string &value)
6767
}
6868

6969
void STDAPIVCALLTYPE PerformCallWithCurl(
70-
_In_ hc_call_handle_t call,
70+
_In_ HCCallHandle call,
7171
_Inout_ AsyncBlock* asyncBlock
7272
)
7373
{

Samples/UWP-Http/MainPage.xaml.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void HttpTestApp::MainPage::StartBackgroundThread()
202202
}
203203
}
204204

205-
std::vector<std::vector<std::string>> ExtractAllHeaders(_In_ hc_call_handle_t call)
205+
std::vector<std::vector<std::string>> ExtractAllHeaders(_In_ HCCallHandle call)
206206
{
207207
uint32_t numHeaders = 0;
208208
HCHttpCallResponseGetNumHeaders(call, &numHeaders);
@@ -280,7 +280,7 @@ void HttpTestApp::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::
280280
HCTraceSetClientCallback(TraceCallback);
281281
HCTraceSetTraceToDebugger(true);
282282

283-
hc_call_handle_t call = nullptr;
283+
HCCallHandle call = nullptr;
284284
HCHttpCallCreate(&call);
285285
HCHttpCallRequestSetUrl(call, requestMethod.c_str(), requestUrl.c_str());
286286
HCHttpCallRequestSetTimeoutWindow(call, timeoutInt);
@@ -308,7 +308,7 @@ void HttpTestApp::MainPage::Button_Click(Platform::Object^ sender, Windows::UI::
308308
std::string responseString;
309309
std::string errMessage;
310310

311-
hc_call_handle_t call = static_cast<hc_call_handle_t>(asyncBlock->context);
311+
HCCallHandle call = static_cast<HCCallHandle>(asyncBlock->context);
312312
HCHttpCallResponseGetNetworkErrorCode(call, &errCode, &platErrCode);
313313
HCHttpCallResponseGetStatusCode(call, &statusCode);
314314
HCHttpCallResponseGetResponseString(call, &str);

0 commit comments

Comments
 (0)