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

Method array_buffer

impit-node/src/response.rs:207–214  ·  view source on GitHub ↗
(&'env self, env: &'env Env, this: This<'env>)

Source from the content-addressed store, hash-verified

205 /// as the response body can only be consumed once. Subsequent calls will result in an error.
206 #[napi(ts_return_type = "Promise<ArrayBuffer>")]
207 pub fn array_buffer(&'env self, env: &'env Env, this: This<'env>) -> Result<Object<'env>> {
208 let response = self.get_inner_response(env, this)?;
209
210 response
211 .get_named_property::<Function<'_, (), Object>>("arrayBuffer")?
212 .apply(Some(&response), ())?
213 .coerce_to_object()
214 }
215
216 /// Returns the response body as a `Uint8Array`.
217 ///

Callers 1

bytesMethod · 0.80

Calls 1

get_inner_responseMethod · 0.80

Tested by

no test coverage detected