format http package's codes