Class: HttpPartRetriever

PartRetrievers. HttpPartRetriever


new HttpPartRetriever(url, cacheHint, decrypt, decryptOptions [, customHeaders])

Constructs a new HttpPartRetriever. HttpPartRetriever retrieves Document parts asynchronously from a .xod file hosted on a web server. The server is required to support the HTTP/1.1 protocol.

Note: As of version 6.0, directly constructing a part retriever is deprecated and the capability will be removed in a future version. Please use the PartRetrievers#getPartRetriever function instead.
Parameters:
Name Type Argument Description
url string The URL of the file to load. May be relative to the current page.
cacheHint PartRetrievers.CacheHinting The type of cache hinting to use
decrypt function Function to be called to decrypt a part of the file
decryptOptions Object An object with options for the decryption e.g. {p: "pass", type: "aes"} where is p is the password
customHeaders Object <optional>
Custom headers to send with the XMLHttpRequests
Properties:
Name Type Description
DISABLE_RANGE_HEADER boolean Whether to disable the range header. This should only be used if your server will look at the range query parameters and return the correct bytes.

Extends

Methods


setCustomHeaders(headers)

Sets custom HTTP headers that will be sent with XOD part requests.
Parameters:
Name Type Description
headers object An object with the properties and values being the header names and values that will be set. e.g. { 'MyCustomHeader': 'MyCustomValue'}
Inherited From:

setErrorCallback(callback)

Sets a function to be called if there is an error loading the document or retrieving a part.
Parameters:
Name Type Description
callback function The callback to handle the error
Inherited From:

setWithCredentials(withCredentials)

Sets withCredentials on xhr requests for the document.
Parameters:
Name Type Description
withCredentials boolean
Inherited From: