move http logic to controller
fix client json error