def attemptRequestWithMaliciousMethod(self, method):
        """
        Attempt a request with the provided method.

        @param method: see L{MethodInjectionTestsMixin}
        """
        headers = http_headers.Headers({b"Host": [b"twisted.invalid"]})
        req = client.Request(
            method=b"GET",
            uri=b"http://twisted.invalid",
            headers=headers,
            bodyProducer=None,
        )
        req.method = method
        req.writeTo(StringTransport())

        Attempt a request with the provided method.

        @param method: see L{MethodInjectionTestsMixin}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_agent.py