use httplib constants instead of hard-coded values