<klip>
<identity>
<title>
API: 304 Not Modified
</title>
</identity>
<locations>
<contentsource>
http://support.klipfolio.com/files/demo/demo.xml
</contentsource>
<icon>
http://www.klipfolio.com/static/klips/klipfolio/sample_icon.png
</icon>
<banner>
http://www.klipfolio.com/static/klips/klipfolio/sample_banner.png
</banner>
</locations>
<style>
alert {
type: item;
}
sender {
itemcol: 2;
noterow: 1;
label: 'Sender';
emphasis: strong;
}
summary {
itemcol: 3;
noterow: 4;
wrap: false;
notelabel: false;
}
date {
itemcol: 4;
noterow: 2;
label: 'Date';
}
category {
noterow: 3;
label: 'Category';
}
level {
itemcol: 1;
noterow: 5;
notelabel: false;
type: image;
}
url {
type: link;
}
id {
key: override;
}
</style>
<klipscript>
<![CDATA[
function onRefresh()
{
var request = Engines.HTTP.newRequest( Prefs.contentsource );
_t( "Access #1: " );
doHTTPRequest( request );
// - - This access will return a 304 Not Modified message
_t( "Access #2: " );
doHTTPRequest( request );
return true;
}
function doHTTPRequest( request )
{
if( request.send() )
{
if( request.response.data )
{
_t( "Got some data!" );
_t( request.response.headers );
// Add the data to the Klip
Engines.Data.process( request.response.data );
}
}
else
{
_t( "Could not reach: " + request.url );
}
}
function _t( s )
{
trace( s + "\r\n" );
}
]]>
</klipscript>
</klip>