def when_i_send_the_request(context, method):
    """
    :type method: str
    :type context: behave.runner.Context
    """
    data = context.apiRequestData
    context.apiRequest = context.apiClient.generic(
        method,
        data['url'],
        data=json.dumps(data['params']),
        content_type=data['content-type'],
        format=data['format'],
    )
:type method: str
    :type context: behave.runner.Context