encode http params