MCPcopy Create free account
hub / github.com/apify/impit / stream

Function stream

impit-python/src/lib.rs:121–162  ·  view source on GitHub ↗
(
        _py: Python<'python>,
        method: &str,
        url: String,
        content: Option<Vec<u8>>,
        data: Option<RequestBody>,
        headers: Option<HashMap<String, String>>,
      

Source from the content-addressed store, hash-verified

119 #[pyfunction]
120 #[pyo3(signature = (method, url, content=None, data=None, headers=None, timeout=Some(Right(USE_CLIENT_DEFAULT_SENTINEL)), force_http3=false, cookie_jar=None, cookies=None, follow_redirects=None, max_redirects=None, proxy=None))]
121 fn stream<'python>(
122 _py: Python<'python>,
123 method: &str,
124 url: String,
125 content: Option<Vec<u8>>,
126 data: Option<RequestBody>,
127 headers: Option<HashMap<String, String>>,
128 timeout: Option<Either<f64, &str>>,
129 force_http3: Option<bool>,
130 cookie_jar: Option<pyo3::Bound<'_, pyo3::PyAny>>,
131 cookies: Option<pyo3::Bound<'_, pyo3::PyAny>>,
132 follow_redirects: Option<bool>,
133 max_redirects: Option<u16>,
134 proxy: Option<String>,
135 ) -> Result<Bound<'python, PyAny>, PyErr> {
136 let client = Client::new(
137 _py,
138 None,
139 None,
140 proxy,
141 Some(Right(USE_CLIENT_DEFAULT_SENTINEL)),
142 None,
143 None,
144 follow_redirects,
145 max_redirects,
146 cookie_jar,
147 cookies,
148 None,
149 None,
150 );
151
152 client?.stream(
153 _py,
154 method,
155 url,
156 content,
157 data,
158 headers,
159 timeout,
160 force_http3,
161 )
162 }
163
164 m.add_function(wrap_pyfunction!(stream, m)?)?;
165

Callers

nothing calls this directly

Calls 1

streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…