function (packet_id) {
      var req = get_req();
      var data;
      req.onreadystatechange = function packet_fetch () {
        if (req.readyState === 4 && req.status === 200) {
          data = jQuery('<div/>').text(
            JSON.parse(req.responseText).data
          ).html();
        }
      };
      // TODO: catch network errors.
      req.open("GET", "/packet/" + packet_id, false);
      req.send("");
      return data;
		}
function (packet_id) {
      var req = get_req();
      var data;
      req.onreadystatechange = function packet_fetch () {
        if (req.readyState === 4 && req.status === 200) {
          data = jQuery('<div/>').text(
            JSON.parse(req.responseText).data
          ).html();
        }
      };
      
      req.open("GET", "/packet/" + packet_id, false);
      req.send("");
      return data;
		}
function ( packet_id ) { var req = get_req ( ) ; var data ; req . onreadystatechange = function packet_fetch ( ) { if ( req . readyState === 4 && req . status === 200 ) { data = jQuery ( '<div/>' ) . text ( JSON . parse ( req . responseText ) . data ) . html ( ) ; } } ; // TODO: catch network errors. req . open ( "GET" , "/packet/" + packet_id , false ) ; req . send ( "" ) ; return data ; }
get a packet (blocking)
get a packet ( blocking )