def api_client(application, request):
    """
    Fixture that returns api_client
    Parameters:
        app (Application): Application for which create the client.
    Returns:
        api_client (HttpClient): Api client for application
    """
    def _api_client(app=application, **kwargs):
        client = app.api_client(**kwargs)
        request.addfinalizer(client.close)
        return client

    return _api_client