Refactor extraction of event id from HTTP location header