Fixed http post bug and modify tests