transform http requests correctly