import requests
import json


def rest(method, url, cookie, data, headers={}, verify=True):
    """
    Generic API client function that can be passed any HTTP verb and appropriate attributes
    :param method: - The HTTP verb desired
    :param url: - the full URL of target and URI
    :param headers: - JSON representation of header dictionary object
    :param cookie: - JSON representation of cookie dictionary object
    :param data: - JSON representation of payload dictionary object
    :param verify: Boolean value to perform strict certificate checks
    :return: returns the entire request object
    """
    return requests.request(method=method, url=url, headers=headers, cookies=cookie,
                            data=json.dumps(data), verify=verify)