Migrated cURL-code to http-module