diff stubs/cyclone/httpclient.pyi @ 1863:0f0ff27e55a3

stubs, mostly autogen or empty Ignore-this: bc70818d2bc92bf022c65c3572b9775e
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 25 May 2019 12:01:26 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/cyclone/httpclient.pyi	Sat May 25 12:01:26 2019 +0000
@@ -0,0 +1,61 @@
+# Stubs for cyclone.httpclient (Python 3)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+from twisted.internet.protocol import Protocol
+from twisted.internet.defer import Deferred
+from typing import Any, Callable, Dict, List, Optional
+
+ListType = list
+DictType = dict
+agent: Any
+proxy_agent: Any
+
+class StringProducer:
+    body: Any = ...
+    length: Any = ...
+    def __init__(self, body: Any) -> None: ...
+    def startProducing(self, consumer: Any): ...
+    def pauseProducing(self) -> None: ...
+    def stopProducing(self) -> None: ...
+
+class Receiver(Protocol):
+    finished: Any = ...
+    data: Any = ...
+    def __init__(self, finished: Any) -> None: ...
+    def dataReceived(self, bytes: Any) -> None: ...
+    def connectionLost(self, reason: Any) -> None: ...
+
+class HTTPClient:
+    url: Any = ...
+    followRedirect: Any = ...
+    maxRedirects: Any = ...
+    headers: Any = ...
+    body: Any = ...
+    proxyConfig: Any = ...
+    timeout: Any = ...
+    agent: Any = ...
+    method: Any = ...
+    response: Any = ...
+    body_producer: Any = ...
+    def __init__(self, url: Any, *args: Any, **kwargs: Any) -> None: ...
+    def fetch(self) -> None: ...
+
+class FetchResponse:
+    code: int
+    phrase: bytes
+    headers: Dict[bytes, List[bytes]]
+    length: int
+    body: bytes
+
+def fetch(
+        url: bytes,
+        method: bytes=b'GET',
+        followRedirect: bool = False,
+        maxRedirects: int = 3,
+        postdata: Optional[bytes]=None,
+        headers: Optional[Dict[bytes, List[bytes]]]=None) -> Deferred[FetchResponse]: ...
+
+class JsonRPC:
+    def __init__(self, url: Any, *args: Any, **kwargs: Any) -> None: ...
+    def __getattr__(self, attr: Any): ...