Web RequestsOn the server side, you can connect to remote web sites to retrieve content or data. These web features can be used for screen scraping and creating web mashups. The server runs with full privileges, so it's not restricted from interacting with other domains. Connection TypesJaxer offers two main API objects for establishing HTTP connections to remote sites:
Internally each uses the XMLHttpRequest object as the basis for the connection. Web Connections
Setting Headers and Other Options
All methods in the Jaxer.Web namespace take as a last, optional parameter a Get a PageGet a Page using a QueryPost to a URLCustomized Web ConnectionsTo have greater control over each connection, Jaxer.XHR.SendOptions can be used as an additional parameter. The send options allow control over:
Get a Page (Customized)This example illustrates one reason you might want to use send options. When logging in to a remote site, a redirect could occur. The testSuccess function allows this.
|
