# coding: utf-8
import re
import inspect
import logging


def parse_url(content):
    request = content
    lines = request.split('\n')

    for index in xrange(len(lines)):
        line = lines[index]
        if not line.strip() and index == len(lines) - 1:
            break

        if re.match("(http|https)://.*",line) and 'HTTP' not in line:
            return {'url': line, 'method': 'GET', 'data': '', 'cookie': '', 'headers': {}}