ActiveHTTP - The Request Interface
Methods
- Start([in] BSTR cmd, [in] BSTR object, [in,defaultvalue("HTTP/1.1")] BSTR ver, [out,retval] VARIANT_BOOL * ok);
- SetTempPath([in] BSTR path, [out,retval] VARIANT_BOOL * ok);
- AddHeader([in] BSTR name, [in] BSTR value, [out,retval] VARIANT_BOOL *ok);
- AddContentByte([in] BYTE val, [out,retval] VARIANT_BOOL * ok);
- AddContentShort([in] short val, [out,retval] VARIANT_BOOL * ok);
- AddContentLong([in] long val, [out,retval] VARIANT_BOOL * ok);
- AddContentFloat([in] float val, [out,retval] VARIANT_BOOL * ok);
- AddContentDouble([in] double val, [out,retval] VARIANT_BOOL * ok);
- AddContentString([in] BSTR val, [out,retval] VARIANT_BOOL * ok);
- AddContentFile([in] BSTR path, [out,retval] VARIANT_BOOL * ok);
- Send([in] BSTR server, [in,defaultvalue(80)] long port, [in,defaultvalue(60)] long timeoutSeconds, [out,retval] long * result);
- GetResponseHeader([out,retval] BSTR * rh);
- GetResponseContentFilePath([out,retval] BSTR *path);
- GetRequestContentLength([out,retval] unsigned long * len);
- CopyResponseContent([in] BSTR path, [out,retval] VARIANT_BOOL *ok);
- Reset();
Return Values of the Send and OpenURL Methods
- Positive Values : Response code returned by the server, 200 for example
- -1 : Timeout
- -2 : Parameter Eror, for example, a port number larger than 65535
- -3 : Not initialized. Call Send without out calling Start first.
- -4 : No response code returned. Should never happen
- -5 : URL error. OpenURL can not parse the URL parameter.
- Other Negtive Values : Socket error number.
-10060 = Time out
-10061 = Access denied
-10022 = Networ Error - usually DNS error