http/request: improve parameters and query handling