| Home | Downloads | Purchase | Documentation | Examples | Contact Us | Web Hosting |        
Products
- HTTP ASP Snap
- IntraDNS
- SiteSpeed




Documentation > HTTP ASP Snap 2.1


HTTP ASP Snap 2.1
  Methods:  
 AddURL
Description Sets Property method with URL location, port and parameters

Example:
Set Http = CreateObject("HTTPASPSNAP.SnapIt")
Http.AddUrl ("http://www.software-components.com/")
Parameters Required: URL Location
Optional: Port Number
 SetAgentName
Description Sets a name of your own Agent.

Example:
Http.SetAgentName ("MyOwnAgent")
Parameters Required: Agent Name
Optional: N/A
 SetDelimiter
Description Sets Delimiter to be returned in between data

Example:
Http.SetDelimiter ("<-test->")
Parameters Required: Delimiter
Optional: N/A
 GetData
Description Returns data back to the client

Example:
Http.GetData
Parameters Required: N/A
Optional: N/A
 Go
Description Sends request to server to start processing

Example:
Http.Go
Parameters Required: N/A
Optional: N/A
 SetTimeOut
Description Sets Time out for all requests

Example:
Http.TimeOut(25)
Parameters Required: Time in seconds
Default: Infinite
Optional: N/A
  Properties:  
 GetLastError
Description Returns Last System or Http specific error code

Example:
Set Http = CreateObject("HTTPASPSNAP.SnapIt")
Http.GetLastError=("http") '- returns http error code
Http.GetLastError=("system") '- returns win32 system error code
Parameters Required: N/A
Default: http
Optional: N/A


  Notifications and Error Handling:  
Overview of Notifications
The HTTP protocol was design in a way so that the client application initiates the request. The server sends information to a client as part of a response to a previous request from a client. HttpAspSnap sends notifications through the GetLastError property which provides two returns:

1. http - Http specific return error code
2. system -Win32 system specific return error code

Progress and State Notifications
  • http - Sends back information about HTTP response code from request made by HttpAspSnap agent.
  • system - Sends back information about win32 error codes.

    Error Types and Codes
    HttpAspSnap returns various error codes back to client application about its state from methods and properties.

    Error Types
    HttpAspSnap supports the following error handling:
  • Error codes returned by HttpAspSnap.
  • Error codes returned from methods and properties of HttpAspSnap.


  •   Error codes returned from methods and properties:  
    ---- 200 series (success) ----
    Error Code:
    200 "OK, request succeeded"
    201 "OK, new resource created"
    202 "Request accepted but processing not completed"
    204 "OK, but no content to return"

    ---- 300 series (redirection) ----
    Error Code:
    301 Requested resource has been assigned a new permanent URL"
    302 "Requested resource resides temporarily under a different URL"
    304 "Document has not been modified"

    ---- 400 series (client error) ----
    Error Code:
    400 "Bad request"
    401 "Unauthorized; request requires user authentication"
    403 "Forbidden for unspecified reason"
    404 "Not Found.";
    407 "Unauthorized; reject by proxy server"

    ---- 500 series (server error) ----
    Error Code:
    500 "Internal server error"
    501 "Not implemented"
    502 "Bad gateway; invalid response from gateway or upstream server"
    503 "Service temporarily unavailable"