Jaxer.Util.Web

Namespace object holding functions and members used to resolve and fetch web resources. Fetching is done via XMLHttpRequests from the server.

Constructor

Jaxer.Web holds the namespace for interacting with web services from the web server directly. This is often done to retrieve information from other networks while still maintaining the

Methods

  • Jaxer.Web.del(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    Send a DELETE-type HTTP request to a URL and return the response.

  • Jaxer.Web.get(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    Fetch a document from a URL by resolving it to a local file (if it starts with file://) or by a GET command.

  • Jaxer.Web.head(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    Send a HEAD-type HTTP request to a URL and return the response.

  • Jaxer.Web.options(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    Send an OPTIONS-type HTTP request to a URL and return the response.

  • Jaxer.Web.post(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    POST data to a URL and return the response web page.

  • Jaxer.Web.put(url, [options]);
    • <String> url - The URL of the page to send the request
    • <Objects> options - (optional)Options for how the request is made ※1

    <String> - The text of the response

    Send a PUT-type HTTP request to a URL and return the response.

    ※1 The options object used the following key values.

    var options = {
    	
    	as : String,
    
    	async : Boolean,
    
    	cacheBuster : Boolean,
    
    	contentType : String,
    
    	headers : Object,
    
    	method : String,
    
    	onfailure : Function,
    
    	onfinished : Function,
    
    	onreadytosend : Function,
    
    	onsslcerterror : Function,
    
    	onsuccess : Function,
    
    	ontimeout : Function,
    
    	overrideMimeType : String,
    
    	password : String,
    
    	testSuccess : Function,
    
    	timeout : Number,
    
    	url : String,
    
    	username : String
    
    }
    Options are not required by default and only options that need to be applied are passed into any given Web function.