ASPHTTP Reference Description

xiaoxiao2021-03-06  170

AskTTP.CONN

Attributes of the ASPHTTP component

Accept indicates what kind of MIME type can be requested to accept, for example, httpobj.accept = "* / *" Authorization license head allows you to get the URL username and password between the place where you need to verify the identity, for example: httpobj. Authorization = "jimb: superbmr" BinaryData Returns data from the two-way format obtained from the getURL request, you can use this property to get the two-way data, such as pictures from another web server, for example: <% response.contentType = "image / gif "Set HTTPObj = Server.CreateObject (" AspHTTP.Conn ") HTTPObj.Url =" http://www.microsoft.com/library/images/gifs/toolbar/write.gif "HTTPObj.GetURL Response.BinaryWrite HTTPObj. BinaryData%> ContentTyPE This property allows you to customize the Content-Type header during POST operation, for example: contentTyPe = "Application / X-WWW-Form-Urlencoded" ERROR Report Request Any error FollowRedirects FollowRedirects tells the component to follow HTTP Server Oriented, for example, httpobj.followredirects = true Headers Headers property contains a response head from an HTTP request, for example: response.write httpobj.Headers port number, for example: httpobj, for example: httpobj, for example: Response.Write httpobj.headers port number, for example: httpobj. Port = 80 PostData PostData Attribute should be set to you want POST request Post to the web server's data for, for example: httpobj.postdata = "suid = jim B & ACT = UPD "Protocol Indicates the HTTP protocol version number, the default value is http / 1.0, for example: httpobj.protocol =" http / 1.1 "Proxy Proxy property contains the address / port of the Proxy Server proxy server, the colon point, for example : Httpobj.proxy = "address.net:2001" ProxyPassword settings the HTTP proxy server for the HTTP proxy server that needs to be verified, now only support the Basic Authentication RequestHod RequestMethod property indicates the type of HTTP request, the legal value is "Get", "post", "," head ". For example: httpobj.requestMethod =" post "registereduser registereduser property Indicates the name of the component authorized user, for example: Response.write" this component is licensed to "&

The httpobj.registereduser response response property contains the HTTP Response response SaveFileTo SaveFileto after receiving the request from the web server, allows you to get any type of file and automatically save to this site. Graphics / text / HTML files can be. For example: httpobj.savefileto = "c: /images/3rdqrtr.jpg" Timeout Timeout Property determines that the component waits for the HTTP Server response, for example: httpobj.timeout = 45 URL URL Property Set the URL you want to operate in HTTP : // At the beginning, for example: httpobj.url = "http://www.myfinancial.com/scripts/update3.asp" Useragent UseRagent allows the component to send a Request's useERAGENT headsencing browser, for example: httpobj.useragent = "Mozilla Compatible (MS IE 3.01 WINNT "Version Indicates the version of the ASPHTTP component, for example, the method of response.write" The Component Version IS "& HTTPOBJ.Versionasphttp Components

Method Parameter Return Value Description getURL None String Returns the response of the HTTP request, this is a string, the component does not support 2 credit return values, such as GIF / JPG image addextraHeader String does not add a custom HTTP header in request, customize The head may include analog browser head, such as the resolution information head ClearExtraheaders, unclear all the add headheader string string, after the getURL call, if there are multiple heads, return the first one . To retrieve all the heads, see GetHeadersExample: strCookie = HttpObj.GetHeader ( "Set-Cookie") You could then on subsequent calls return the same cookie as follows: if strCookie <> "" then HttpObj.AddExtraHeader "Cookie:" & StrCookieEnd ifgethrefs No Variant string array, after calling getURL, you can call GethRefs to process tags.gethrefs returns a variable group of strings you can further or displayed, see hreflist. ASP (Downloading Bag) Use this method's sample code, GethRefs is increasing in ASPHTTP version 2.4. URLDECode Strigue String Decoding a URL Code String Urlencode Strigue String Encoding a string into a legitimate URL value EXAMPLE: httpobj.url = httpobj.urlencode ("http://www.test_xyz.com?avalue=this is a Value with spaces ")


New Post(0)