changed to curl for connection

changed to curl, tried workaround from Joel for x-api-key as header