<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dispatch_webhook_request(url=None, method='GET', params=None, json=None, data=None, headers=None, timeout=5):
 """Task dispatching to an URL. :param url: The URL location of the HTTP callback task. :param method: Method to use when dispatching the callback. Usually `GET` or `POST`. :param params: Keyword arguments to pass on to the HTTP callback. :param json: JSON as body to pass on to the POST HTTP callback. :param headers: HTTP headers applied to callback. """

    if method == 'GET':
        resp = urlopen(url, method, params=params, headers=headers)
    elif method in ('POST', 'DELETE', 'PUT'):
        resp = urlopen(url, method, json=json, data=data, headers=headers)
    else:
        raise NotImplementedError

    return extract_response(resp)