Consolidate some AJAX logic into transceive().