@staticmethod
    @defer.inlineCallbacks
    def submit_request(request,
                       save_request=False,
                       intercepting_macros={},
                       stream_transport=None,
                       _factory_string_transport=False,
                       _conn_info=None):

        from .proxy import ProxyClientFactory, get_next_connection_id, get_endpoint
        from .pappy import session
        from .tests.testutil import TLSStringTransport

        # _factory__string_transport, _conn_classes are only for unit tests. Do not use.

        factory = None
        if stream_transport is None:
            factory = ProxyClientFactory(request,
                                        save_all=save_request,
                                        stream_response=False,
                                        return_transport=None)
        else:
            factory = ProxyClientFactory(request,
                                        save_all=save_request,
                                        stream_response=True,
                                        return_transport=stream_transport)

        # Set up stuff for unit test if needed
        if _factory_string_transport:
            factory._use_string_transport = True
        if _conn_info is not None:
            # Pass factory back to unit test
            _conn_info['factory'] = factory
            factory._conn_info = _conn_info

        # Set up factory settings
        factory.intercepting_macros = intercepting_macros
        factory.connection_id = get_next_connection_id()
        factory.connect()
        new_req = yield factory.data_defer
        request.response = new_req.response
        defer.returnValue(request)
Test page with login at /contacts/type/edit/(?P<type_id>\d+)
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/http.py/Request.submit_request--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/identities/tests.py/IdentitiesViewsTest.test_contact_type_edit