declare headers after the connection is opened