fix (client): refactor request sending and fix a bug