2 * Copyright 2011 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include
"httprequestid.h"
24 #define threading
(model
)
26 #define vi_progid
(str
)
30 uuid(662901fc
-6951-4854-9eb2
-d9a2570f2b2e
),
31 helpstring("Microsoft WinHTTP Services, version 5.1"),
37 importlib
("stdole2.tlb");
39 typedef [public] LONG HTTPREQUEST_PROXY_SETTING
;
40 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DEFAULT
= 0x00000000;
41 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PRECONFIG
= 0x00000000;
42 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DIRECT
= 0x00000001;
43 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PROXY
= 0x00000002;
45 typedef [public] LONG HTTPREQUEST_SETCREDENTIALS_FLAGS
;
46 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
= 0x00000000;
47 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_PROXY
= 0x00000001;
50 [uuid(12782009-fe90
-4877-9730-e5e183669b19
)]
51 enum WinHttpRequestOption
53 WinHttpRequestOption_UserAgentString
,
54 WinHttpRequestOption_URL
,
55 WinHttpRequestOption_URLCodePage
,
56 WinHttpRequestOption_EscapePercentInURL
,
57 WinHttpRequestOption_SslErrorIgnoreFlags
,
58 WinHttpRequestOption_SelectCertificate
,
59 WinHttpRequestOption_EnableRedirects
,
60 WinHttpRequestOption_UrlEscapeDisable
,
61 WinHttpRequestOption_UrlEscapeDisableQuery
,
62 WinHttpRequestOption_SecureProtocols
,
63 WinHttpRequestOption_EnableTracing
,
64 WinHttpRequestOption_RevertImpersonationOverSsl
,
65 WinHttpRequestOption_EnableHttpsToHttpRedirects
,
66 WinHttpRequestOption_EnablePassportAuthentication
,
67 WinHttpRequestOption_MaxAutomaticRedirects
,
68 WinHttpRequestOption_MaxResponseHeaderSize
,
69 WinHttpRequestOption_MaxResponseDrainSize
,
70 WinHttpRequestOption_EnableHttp1_1
,
71 WinHttpRequestOption_EnableCertificateRevocationCheck
,
72 WinHttpRequestOption_RejectUserpwd
73 } WinHttpRequestOption
;
76 [uuid(9d8a6df8
-13de
-4b1f
-a330
-67c719d62514
)]
77 enum WinHttpRequestAutoLogonPolicy
79 AutoLogonPolicy_Always
,
80 AutoLogonPolicy_OnlyIfBypassProxy
,
82 } WinHttpRequestAutoLogonPolicy
;
86 uuid(016fe2ec
-b2c8
-45f8
-b23b
-39e53a75396b
),
91 pointer_default(unique)
93 interface IWinHttpRequest
: IDispatch
95 [id(DISPID_HTTPREQUEST_SETPROXY
)]
97 [in] HTTPREQUEST_PROXY_SETTING proxy_setting
,
98 [in, optional] VARIANT proxy_server
,
99 [in, optional] VARIANT bypass_list
);
101 [id(DISPID_HTTPREQUEST_SETCREDENTIALS
)]
102 HRESULT SetCredentials
(
105 [in] HTTPREQUEST_SETCREDENTIALS_FLAGS flags
);
107 [id(DISPID_HTTPREQUEST_OPEN
)]
111 [in, optional] VARIANT async
);
113 [id(DISPID_HTTPREQUEST_SETREQUESTHEADER
)]
114 HRESULT SetRequestHeader
(
118 [id(DISPID_HTTPREQUEST_GETRESPONSEHEADER
)]
119 HRESULT GetResponseHeader
(
121 [out, retval] BSTR *value
);
123 [id(DISPID_HTTPREQUEST_GETALLRESPONSEHEADERS
)]
124 HRESULT GetAllResponseHeaders
(
125 [out, retval] BSTR *headers
);
127 [id(DISPID_HTTPREQUEST_SEND
)]
129 [in, optional] VARIANT body
);
131 [propget, id(DISPID_HTTPREQUEST_STATUS
)]
133 [out, retval] LONG *status
);
135 [propget, id(DISPID_HTTPREQUEST_STATUSTEXT
)]
137 [out, retval] BSTR *status
);
139 [propget, id(DISPID_HTTPREQUEST_RESPONSETEXT
)]
140 HRESULT ResponseText
(
141 [out, retval] BSTR *body
);
143 [propget, id(DISPID_HTTPREQUEST_RESPONSEBODY
)]
144 HRESULT ResponseBody
(
145 [out, retval] VARIANT *body
);
147 [propget, id(DISPID_HTTPREQUEST_RESPONSESTREAM
)]
148 HRESULT ResponseStream
(
149 [out, retval] VARIANT *body
);
151 [propget, id(DISPID_HTTPREQUEST_OPTION
)]
153 [in] WinHttpRequestOption option
,
154 [out, retval] VARIANT *value
);
156 [propput, id(DISPID_HTTPREQUEST_OPTION
)]
158 [in] WinHttpRequestOption option
,
161 [id(DISPID_HTTPREQUEST_WAITFORRESPONSE
)]
162 HRESULT WaitForResponse
(
163 [in, optional] VARIANT timeout
,
164 [out, retval] VARIANT_BOOL *succeeded
);
166 [id(DISPID_HTTPREQUEST_ABORT
)]
169 [id(DISPID_HTTPREQUEST_SETTIMEOUTS
)]
171 [in] LONG resolve_timeout
,
172 [in] LONG connect_timeout
,
173 [in] LONG send_timeout
,
174 [in] LONG receive_timeout
);
176 [id(DISPID_HTTPREQUEST_SETCLIENTCERTIFICATE
)]
177 HRESULT SetClientCertificate
(
178 [in] BSTR certificate
);
180 [id(DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY
)]
181 HRESULT SetAutoLogonPolicy
(
182 [in] WinHttpRequestAutoLogonPolicy policy
);
185 helpstring("WinHttpRequest Component version 5.1"),
186 threading
(apartment
),
187 progid
("WinHttp.WinHttpRequest.5.1"),
188 uuid(2087c2f4
-2cef
-4953-a8ab
-66779b670495
)
190 coclass WinHttpRequest
{ interface IWinHttpRequest
; }