Generic functionaly (mobile/web) to make ajax calls to the fluxtream server