add encode for responsebody