Skip to content

Instantly share code, notes, and snippets.

@yamamaya
Created November 30, 2014 05:38
Show Gist options
  • Save yamamaya/cc103dceb36a0c8bc0d1 to your computer and use it in GitHub Desktop.
Save yamamaya/cc103dceb36a0c8bc0d1 to your computer and use it in GitHub Desktop.
$.ajax( {
type: "GET",
url: "/command.cgi?op=190&CTRL=0x1f&DATA=" + value,
cache: true,
dataType: "json",
timeout: 3000,
beforeSend: function( jqXHR, settings ) {
jqXHR.setRequestHeader( "If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT" );
}
} ).done( function( data, textStatus, jqXHR ) {
if ( data.STATUS != "OK" ) {
alert( data.STATUS );
}
} ).fail( function( jqXHR, textStatus, errorThrown ) {
alert( textStatus + "\n" + errorThrown );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment