new api functions for http headers
improved url encoding api