def get_http_line(header_lines, http_methods):
 for header in header_lines:
  for method in http_methods:
   if header.startswith(method):
    http_line = header
    return http_line

def get_http_line ( header_lines , http_methods ) : for header in header_lines : for method in http_methods : if header . startswith ( method ) : http_line = header return http_line
get the header with the http command .