VirtualBox

source: vbox/trunk/include/iprt/http.h@ 74091

Last change on this file since 74091 was 74091, checked in by vboxsync, 7 years ago

IPRT/http: New read/write callbacks APIs (untested). bugref:9167 [build fix]

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.8 KB
Line 
1/* $Id: http.h 74091 2018-09-05 17:58:31Z vboxsync $ */
2/** @file
3 * IPRT - Simple HTTP/HTTPS Client API.
4 */
5
6/*
7 * Copyright (C) 2012-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___iprt_http_h
28#define ___iprt_http_h
29
30#include <iprt/types.h>
31
32RT_C_DECLS_BEGIN
33
34/** @defgroup grp_rt_http RTHttp - Simple HTTP/HTTPS Client API
35 * @ingroup grp_rt
36 * @{
37 */
38
39/** @todo the following three definitions may move the iprt/types.h later. */
40/** HTTP/HTTPS client handle. */
41typedef R3PTRTYPE(struct RTHTTPINTERNAL *) RTHTTP;
42/** Pointer to a HTTP/HTTPS client handle. */
43typedef RTHTTP *PRTHTTP;
44/** Nil HTTP/HTTPS client handle. */
45#define NIL_RTHTTP ((RTHTTP)0)
46
47
48/**
49 * Creates a HTTP client instance.
50 *
51 * @returns IPRT status code.
52 * @param phHttp Where to store the HTTP handle.
53 */
54RTR3DECL(int) RTHttpCreate(PRTHTTP phHttp);
55
56/**
57 * Resets a HTTP client instance.
58 *
59 * @returns IPRT status code.
60 * @param hHttp Handle to the HTTP interface.
61 */
62RTR3DECL(int) RTHttpReset(RTHTTP hHttp);
63
64/**
65 * Destroys a HTTP client instance.
66 *
67 * @returns IPRT status code.
68 * @param hHttp Handle to the HTTP interface.
69 */
70RTR3DECL(int) RTHttpDestroy(RTHTTP hHttp);
71
72
73/**
74 * Retrieve the redir location for 301 responses.
75 *
76 * @param hHttp Handle to the HTTP interface.
77 * @param ppszRedirLocation Where to store the string. To be freed with
78 * RTStrFree().
79 */
80RTR3DECL(int) RTHttpGetRedirLocation(RTHTTP hHttp, char **ppszRedirLocation);
81
82/**
83 * Perform a simple blocking HTTP GET request.
84 *
85 * This is a just a convenient wrapper around RTHttpGetBinary that returns a
86 * different type and sheds a parameter.
87 *
88 * @returns iprt status code.
89 *
90 * @param hHttp The HTTP client handle.
91 * @param pszUrl URL.
92 * @param ppszNotUtf8 Where to return the pointer to the HTTP response.
93 * The string is of course zero terminated. Use
94 * RTHttpFreeReponseText to free.
95 *
96 * @remarks BIG FAT WARNING!
97 *
98 * This function does not guarantee the that returned string is valid UTF-8 or
99 * any other kind of text encoding!
100 *
101 * The caller must determine and validate the string encoding _before_
102 * passing it along to functions that expect UTF-8!
103 *
104 * Also, this function does not guarantee that the returned string
105 * doesn't have embedded zeros and provides the caller no way of
106 * finding out! If you are worried about the response from the HTTPD
107 * containing embedded zero's, use RTHttpGetBinary instead.
108 */
109RTR3DECL(int) RTHttpGetText(RTHTTP hHttp, const char *pszUrl, char **ppszNotUtf8);
110
111/**
112 * Perform a simple blocking HTTP HEAD request.
113 *
114 * This is a just a convenient wrapper around RTHttpGetBinary that returns a
115 * different type and sheds a parameter.
116 *
117 * @returns iprt status code.
118 *
119 * @param hHttp The HTTP client handle.
120 * @param pszUrl URL.
121 * @param ppszNotUtf8 Where to return the pointer to the HTTP response.
122 * The string is of course zero terminated. Use
123 * RTHttpFreeReponseText to free.
124 *
125 * @remarks BIG FAT WARNING!
126 *
127 * This function does not guarantee the that returned string is valid UTF-8 or
128 * any other kind of text encoding!
129 *
130 * The caller must determine and validate the string encoding _before_
131 * passing it along to functions that expect UTF-8!
132 *
133 * Also, this function does not guarantee that the returned string
134 * doesn't have embedded zeros and provides the caller no way of
135 * finding out! If you are worried about the response from the HTTPD
136 * containing embedded zero's, use RTHttpGetHeaderBinary instead.
137 */
138RTR3DECL(int) RTHttpGetHeaderText(RTHTTP hHttp, const char *pszUrl, char **ppszNotUtf8);
139
140/**
141 * Frees memory returned by RTHttpGetText.
142 *
143 * @param pszNotUtf8 What RTHttpGetText returned.
144 */
145RTR3DECL(void) RTHttpFreeResponseText(char *pszNotUtf8);
146
147/**
148 * Perform a simple blocking HTTP GET request.
149 *
150 * @returns iprt status code.
151 *
152 * @param hHttp The HTTP client handle.
153 * @param pszUrl The URL.
154 * @param ppvResponse Where to store the HTTP response data. Use
155 * RTHttpFreeResponse to free.
156 * @param pcb Size of the returned buffer.
157 */
158RTR3DECL(int) RTHttpGetBinary(RTHTTP hHttp, const char *pszUrl, void **ppvResponse, size_t *pcb);
159
160/**
161 * Perform a simple blocking HTTP HEAD request.
162 *
163 * @returns iprt status code.
164 *
165 * @param hHttp The HTTP client handle.
166 * @param pszUrl The URL.
167 * @param ppvResponse Where to store the HTTP response data. Use
168 * RTHttpFreeResponse to free.
169 * @param pcb Size of the returned buffer.
170 */
171RTR3DECL(int) RTHttpGetHeaderBinary(RTHTTP hHttp, const char *pszUrl, void **ppvResponse, size_t *pcb);
172
173/**
174 * Frees memory returned by RTHttpGetBinary.
175 *
176 * @param pvResponse What RTHttpGetBinary returned.
177 */
178RTR3DECL(void) RTHttpFreeResponse(void *pvResponse);
179
180/**
181 * Perform a simple blocking HTTP request, writing the output to a file.
182 *
183 * @returns iprt status code.
184 *
185 * @param hHttp The HTTP client handle.
186 * @param pszUrl The URL.
187 * @param pszDstFile The destination file name.
188 */
189RTR3DECL(int) RTHttpGetFile(RTHTTP hHttp, const char *pszUrl, const char *pszDstFile);
190
191/** HTTP methods. */
192typedef enum RTHTTPMETHOD
193{
194 RTHTTPMETHOD_INVALID = 0,
195 RTHTTPMETHOD_GET,
196 RTHTTPMETHOD_PUT,
197 RTHTTPMETHOD_POST,
198 RTHTTPMETHOD_PATCH,
199 RTHTTPMETHOD_DELETE,
200 RTHTTPMETHOD_HEAD,
201 RTHTTPMETHOD_OPTIONS,
202 RTHTTPMETHOD_TRACE,
203 RTHTTPMETHOD_END,
204 RTHTTPMETHOD_32BIT_HACK = 0x7fffffff
205} RTHTTPMETHOD;
206
207/**
208 * Returns the name of the HTTP method.
209 * @returns Read only string.
210 * @param enmMethod The HTTP method to name.
211 */
212RTR3DECL(const char *) RTHttpMethodName(RTHTTPMETHOD enmMethod);
213
214/**
215 * Performs generic blocking HTTP request, optionally returning the body and headers.
216 *
217 * @returns IPRT status code.
218 * @param hHttp The HTTP client handle.
219 * @param pszUrl The URL.
220 * @param enmMethod The HTTP method for the request.
221 * @param pvReqBody Pointer to the request body. NULL if none.
222 * @param cbReqBody Size of the request body. Zero if none.
223 * @param puHttpStatus Where to return the HTTP status code. Optional.
224 * @param ppvHeaders Where to return the headers. Optional.
225 * @param pcbHeaders Where to return the header size.
226 * @param ppvBody Where to return the body. Optional.
227 * @param pcbBody Where to return the body size.
228 */
229RTR3DECL(int) RTHttpPerform(RTHTTP hHttp, const char *pszUrl, RTHTTPMETHOD enmMethod, void const *pvReqBody, size_t cbReqBody,
230 uint32_t *puHttpStatus, void **ppvHeaders, size_t *pcbHeaders, void **ppvBody, size_t *pcbBody);
231
232
233/**
234 * Abort a pending HTTP request. A blocking RTHttpGet() call will return with
235 * VERR_HTTP_ABORTED. It may take some time (current cURL implementation needs
236 * up to 1 second) before the request is aborted.
237 *
238 * @returns iprt status code.
239 *
240 * @param hHttp The HTTP client handle.
241 */
242RTR3DECL(int) RTHttpAbort(RTHTTP hHttp);
243
244/**
245 * Tells the HTTP interface to use the system proxy configuration.
246 *
247 * @returns iprt status code.
248 * @param hHttp The HTTP client handle.
249 */
250RTR3DECL(int) RTHttpUseSystemProxySettings(RTHTTP hHttp);
251
252/**
253 * Specify proxy settings.
254 *
255 * @returns iprt status code.
256 *
257 * @param hHttp The HTTP client handle.
258 * @param pszProxyUrl URL of the proxy server.
259 * @param uPort port number of the proxy, use 0 for not specifying a port.
260 * @param pszProxyUser Username, pass NULL for no authentication.
261 * @param pszProxyPwd Password, pass NULL for no authentication.
262 *
263 * @todo This API does not allow specifying the type of proxy server... We're
264 * currently assuming it's a HTTP proxy.
265 */
266RTR3DECL(int) RTHttpSetProxy(RTHTTP hHttp, const char *pszProxyUrl, uint32_t uPort,
267 const char *pszProxyUser, const char *pszProxyPwd);
268
269/**
270 * Set follow redirects (3xx)
271 *
272 * @returns iprt status code.
273 *
274 * @param hHttp The HTTP client handle.
275 * @param cMaxRedirects Max number of redirects to follow. Zero if no
276 * redirects should be followed but instead returned
277 * to caller.
278 */
279RTR3DECL(int) RTHttpSetFollowRedirects(RTHTTP hHttp, uint32_t cMaxRedirects);
280
281/**
282 * Set custom raw headers.
283 *
284 * @returns iprt status code.
285 *
286 * @param hHttp The HTTP client handle.
287 * @param cHeaders Number of custom headers.
288 * @param papszHeaders Array of headers in form "foo: bar".
289 */
290RTR3DECL(int) RTHttpSetHeaders(RTHTTP hHttp, size_t cHeaders, const char * const *papszHeaders);
291
292/** @name RTHTTPADDHDR_F_XXX - Flags for RTHttpAddRawHeader and RTHttpAddHeader
293 * @{ */
294#define RTHTTPADDHDR_F_BACK UINT32_C(0) /**< Append the header. */
295#define RTHTTPADDHDR_F_FRONT UINT32_C(1) /**< Prepend the header. */
296/** @} */
297
298/**
299 * Adds a raw header.
300 *
301 * @returns IPRT status code.
302 * @param hHttp The HTTP client handle.
303 * @param pszHeader Header string on the form "foo: bar".
304 * @param fFlags RTHTTPADDHDR_F_FRONT or RTHTTPADDHDR_F_BACK.
305 */
306RTR3DECL(int) RTHttpAddRawHeader(RTHTTP hHttp, const char *pszHeader, uint32_t fFlags);
307
308/**
309 * Adds a header field and value.
310 *
311 * @returns IPRT status code.
312 * @param hHttp The HTTP client handle.
313 * @param pszField The header field name.
314 * @param pszValue The header field value.
315 * @param cchValue The value length or RTSTR_MAX.
316 * @param fFlags Only RTHTTPADDHDR_F_FRONT or RTHTTPADDHDR_F_BACK,
317 * may be extended with encoding controlling flags if
318 * needed later.
319 */
320RTR3DECL(int) RTHttpAddHeader(RTHTTP hHttp, const char *pszField, const char *pszValue, size_t cchValue, uint32_t fFlags);
321
322/**
323 * Gets a header previously added using RTHttpSetHeaders, RTHttpAppendRawHeader
324 * or RTHttpAppendHeader.
325 *
326 * @returns Pointer to the header value on if found, otherwise NULL.
327 * @param hHttp The HTTP client handle.
328 * @param pszField The field name (no colon).
329 * @param cchField The length of the field name or RTSTR_MAX.
330 */
331RTR3DECL(const char *) RTHttpGetHeader(RTHTTP hHttp, const char *pszField, size_t cchField);
332
333/**
334 * Sign all headers present according to pending "Signing HTTP Messages" RFC.
335 *
336 * Currently hardcoded RSA-SHA-256 algorithm choice.
337 *
338 * @returns IPRT status code.
339 * @param hHttp The HTTP client handle.
340 * @param enmMethod The HTTP method that will be used for the request.
341 * @param pszUrl The target URL for the request.
342 * @param hKey The RSA key to use when signing.
343 * @param pszKeyId The key ID string corresponding to @a hKey.
344 * @param fFlags Reserved for future, MBZ.
345 *
346 * @note Caller is responsible for making all desired fields are present before
347 * making the call.
348 *
349 * @remarks Latest RFC draft at the time of writing:
350 * https://tools.ietf.org/html/draft-cavage-http-signatures-10
351 */
352RTR3DECL(int) RTHttpSignHeaders(RTHTTP hHttp, RTHTTPMETHOD enmMethod, const char *pszUrl,
353 RTCRKEY hKey, const char *pszKeyId, uint32_t fFlags);
354
355/**
356 * Tells the HTTP client instance to gather system CA certificates into a
357 * temporary file and use it for HTTPS connections.
358 *
359 * This will be called automatically if a 'https' URL is presented and
360 * RTHttpSetCaFile hasn't been called yet.
361 *
362 * @returns IPRT status code.
363 * @param hHttp The HTTP client handle.
364 * @param pErrInfo Where to store additional error/warning information.
365 * Optional.
366 */
367RTR3DECL(int) RTHttpUseTemporaryCaFile(RTHTTP hHttp, PRTERRINFO pErrInfo);
368
369/**
370 * Set a custom certification authority file, containing root certificates.
371 *
372 * @returns iprt status code.
373 *
374 * @param hHttp The HTTP client handle.
375 * @param pszCAFile File name containing root certificates.
376 *
377 * @remarks For portable HTTPS support, use RTHttpGatherCaCertsInFile and pass
378 */
379RTR3DECL(int) RTHttpSetCAFile(RTHTTP hHttp, const char *pszCAFile);
380
381/**
382 * Gathers certificates into a cryptographic (certificate) store
383 *
384 * This is a just a combination of RTHttpGatherCaCertsInStore and
385 * RTCrStoreCertExportAsPem.
386 *
387 * @returns IPRT status code.
388 * @param hStore The certificate store to gather the certificates
389 * in.
390 * @param fFlags RTHTTPGATHERCACERT_F_XXX.
391 * @param pErrInfo Where to store additional error/warning information.
392 * Optional.
393 */
394RTR3DECL(int) RTHttpGatherCaCertsInStore(RTCRSTORE hStore, uint32_t fFlags, PRTERRINFO pErrInfo);
395
396/**
397 * Gathers certificates into a file that can be used with RTHttpSetCAFile.
398 *
399 * This is a just a combination of RTHttpGatherCaCertsInStore and
400 * RTCrStoreCertExportAsPem.
401 *
402 * @returns IPRT status code.
403 * @param pszCaFile The output file.
404 * @param fFlags RTHTTPGATHERCACERT_F_XXX.
405 * @param pErrInfo Where to store additional error/warning information.
406 * Optional.
407 */
408RTR3DECL(int) RTHttpGatherCaCertsInFile(const char *pszCaFile, uint32_t fFlags, PRTERRINFO pErrInfo);
409
410/**
411 * Callback function to be called during RTHttpGet*().
412 *
413 * Register it using RTHttpSetDownloadProgressCallback().
414 *
415 * @param hHttp The HTTP client handle.
416 * @param pvUser The user parameter specified when registering the callback.
417 * @param cbDowloadTotal The content-length value, if available.
418 * Warning! Not entirely clear what it will be if
419 * unavailable, probably 0.
420 * @param cbDowloaded How much was downloaded thus far.
421 */
422typedef DECLCALLBACK(void) FNRTHTTPDOWNLDPROGRCALLBACK(RTHTTP hHttp, void *pvUser, uint64_t cbDownloadTotal, uint64_t cbDownloaded);
423/** Pointer to a download progress callback. */
424typedef FNRTHTTPDOWNLDPROGRCALLBACK *PFNRTHTTPDOWNLDPROGRCALLBACK;
425
426/**
427 * Set the callback function which is called during (GET)
428 *
429 * @returns IPRT status code.
430 * @param hHttp The HTTP client handle.
431 * @param pfnCallback Progress function to be called. Set it to
432 * NULL to disable the callback.
433 * @param pvUser Convenience pointer for the callback function.
434 */
435RTR3DECL(int) RTHttpSetDownloadProgressCallback(RTHTTP hHttp, PFNRTHTTPDOWNLDPROGRCALLBACK pfnCallback, void *pvUser);
436
437/**
438 * Callback function for receiving body data.
439 *
440 * @returns IPRT status code.
441 * @param hHttp The HTTP client handle.
442 * @param pvBuf Pointer to buffer with body bytes.
443 * @param cbBuf Number of bytes in the buffer.
444 * @param uHttpStatus The HTTP status code.
445 * @param offContent The byte offset corresponding to the start of @a pvBuf.
446 * @param cbContent The content length field value, UINT64_MAX if not available.
447 * @param pvUser The user parameter.
448 */
449typedef DECLCALLBACK(int) FNRTHTTPDOWNLOADCALLBACK(RTHTTP hHttp, void const *pvBuf, size_t cbBuf, uint32_t uHttpStatus,
450 uint64_t offContent, uint64_t cbContent, void *pvUser);
451/** Pointer to a download data receiver callback. */
452typedef FNRTHTTPDOWNLOADCALLBACK *PFNRTHTTPDOWNLOADCALLBACK;
453
454/**
455 * Set the callback function for downloading data (HTTP GET).
456 *
457 * @returns IPRT status code.
458 * @param hHttp The HTTP client handle.
459 * @param fFlags RTHTTPDOWNLOAD_F_XXX.
460 * @param pfnCallback The callback function. Pass NULL to reset the callback.
461 * @param pvUser Convenience pointer for the callback function.
462 *
463 * @remarks There can only be one download callback, so it is not possible to
464 * call this method for different status codes. Only the last one
465 * with be honored.
466 *
467 * @note This only works reliably with RTHttpPerform at the moment.
468 */
469RTR3DECL(int) RTHttpSetDownloadCallback(RTHTTP hHttp, uint32_t fFlags, PFNRTHTTPDOWNLOADCALLBACK pfnCallback, void *pvUser);
470
471/** @name RTHTTPDOWNLOAD_F_XXX */
472/** The lower 10 bits gives the HTTP status required by the callback.
473 * For all other status codes, any body data will be returned via the
474 * RTHttpPerform ppvBody/pcbBody return parameters. */
475#define RTHTTPDOWNLOAD_F_F_ONLY_STATUS_MASK UINT32_C(0x000003ff)
476/** Callback requires no special HTTP status. */
477#define RTHTTPDOWNLOAD_F_F_ANY_STATUS UINT32_C(0x000003ff)
478/** @} */
479
480
481/**
482 * Callback function for producing body data for uploading.
483 *
484 * @returns IPRT status code.
485 * @param hHttp The HTTP client handle.
486 * @param pvBuf Where to put the data to upload
487 * @param cbBuf Max number of bytes to provide.
488 * @param offContent The byte offset corresponding to the start of @a pvBuf.
489 * @param pcbActual Actual number of bytes provided.
490 * @param pvUser The user parameter.
491 */
492typedef DECLCALLBACK(int) FNRTHTTPUPLOADCALLBACK(RTHTTP hHttp, void *pvBuf, size_t cbBuf, uint64_t offContent,
493 size_t *pcbActual, void *pvUser);
494/** Pointer to an upload data producer callback. */
495typedef FNRTHTTPUPLOADCALLBACK *PFNRTHTTPUPLOADCALLBACK;
496
497/**
498 * Set the callback function for providing upload data (HTTP PUT / POST).
499 *
500 * @returns IPRT status code.
501 * @param hHttp The HTTP client handle.
502 * @param cbContent The content length, UINT64_MAX if not know or specified separately.
503 * @param pfnCallback The callback function. Pass NULL to reset the callback.
504 * @param pvUser Convenience pointer for the callback function.
505 *
506 * @note This only works reliably with RTHttpPerform at the moment.
507 */
508RTR3DECL(int) RTHttpSetUploadCallback(RTHTTP hHttp, uint64_t cbContent, PFNRTHTTPUPLOADCALLBACK pfnCallback, void *pvUser);
509
510
511/**
512 * Callback for consuming header fields.
513 *
514 * @returns IPRT status code.
515 * @param hHttp The HTTP client handle.
516 * @param pszField The field name.
517 * @param cchField The length of the field.
518 * @param pszValue The field value.
519 * @param cchValue The length of the value.
520 * @param pvUser The user parameter.
521 */
522typedef DECLCALLBACK(int) FNRTHTTPHEADERCALLBACK(RTHTTP hHttp, const char *pszField, size_t cchField,
523 const char *pszValue, size_t cchValue, void *pvUser);
524/** Pointer to a header field consumer callback. */
525typedef FNRTHTTPHEADERCALLBACK *PFNRTHTTPHEADERCALLBACK;
526
527/**
528 * Set the callback function for processing header fields in the response.
529 *
530 * @returns IPRT status code.
531 * @param hHttp The HTTP client handle.
532 * @param pfnCallback The callback function. Pass NULL to reset the callback.
533 * @param pvUser Convenience pointer for the callback function.
534 *
535 * @note This only works reliably with RTHttpPerform at the moment.
536 */
537RTR3DECL(int) RTHttpSetHeaderCallback(RTHTTP hHttp, PFNRTHTTPHEADERCALLBACK pfnCallback, void *pvUser);
538
539
540/** @name thin wrappers for setting one or a few related curl options
541 * @remarks Temporary. Will not be included in the 6.0 release!
542 * @{ */
543typedef size_t FNRTHTTPREADCALLBACKRAW(void *pbDst, size_t cbItem, size_t cItems, void *pvUser);
544typedef FNRTHTTPREADCALLBACKRAW *PFNRTHTTPREADCALLBACKRAW;
545#define RT_HTTP_READCALLBACK_ABORT 0x10000000 /* CURL_READFUNC_ABORT */
546RTR3DECL(int) RTHttpRawSetReadCallback(RTHTTP hHttp, PFNRTHTTPREADCALLBACKRAW pfnRead, void *pvUser);
547
548typedef size_t FNRTHTTPWRITECALLBACKRAW(char *pbSrc, size_t cbItem, size_t cItems, void *pvUser);
549typedef FNRTHTTPWRITECALLBACKRAW *PFNRTHTTPWRITECALLBACKRAW;
550RTR3DECL(int) RTHttpRawSetWriteCallback(RTHTTP hHttp, PFNRTHTTPWRITECALLBACKRAW pfnWrite, void *pvUser);
551RTR3DECL(int) RTHttpRawSetWriteHeaderCallback(RTHTTP hHttp, PFNRTHTTPWRITECALLBACKRAW pfnWrite, void *pvUser);
552
553RTR3DECL(int) RTHttpRawSetUrl(RTHTTP hHttp, const char *pszUrl);
554
555RTR3DECL(int) RTHttpRawSetGet(RTHTTP hHttp);
556RTR3DECL(int) RTHttpRawSetHead(RTHTTP hHttp);
557RTR3DECL(int) RTHttpRawSetPost(RTHTTP hHttp);
558RTR3DECL(int) RTHttpRawSetPut(RTHTTP hHttp);
559RTR3DECL(int) RTHttpRawSetDelete(RTHTTP hHttp);
560RTR3DECL(int) RTHttpRawSetCustomRequest(RTHTTP hHttp, const char *pszVerb);
561
562RTR3DECL(int) RTHttpRawSetPostFields(RTHTTP hHttp, const void *pv, size_t cb);
563RTR3DECL(int) RTHttpRawSetInfileSize(RTHTTP hHttp, RTFOFF cb);
564
565RTR3DECL(int) RTHttpRawSetVerbose(RTHTTP hHttp, bool fValue);
566RTR3DECL(int) RTHttpRawSetTimeout(RTHTTP hHttp, long sec);
567
568RTR3DECL(int) RTHttpRawPerform(RTHTTP hHttp);
569
570RTR3DECL(int) RTHttpRawGetResponseCode(RTHTTP hHttp, long *plCode);
571/** @} */
572
573/** @} */
574
575RT_C_DECLS_END
576
577#endif
578
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette