unstructured-client
Version:
<h3 align="center"> <img src="https://raw.githubusercontent.com/Unstructured-IO/unstructured/main/img/unstructured_logo.png" height="200" > </h3>
18 lines • 877 B
TypeScript
import { type BeforeRequestContext, BeforeRequestHook } from "../types.js";
/**
* Represents a hook for fixing array parameters before sending a request.
*/
export declare class FixArrayParamsHook implements BeforeRequestHook {
/**
* Fixes specific array parameters in the request.
* The SDK creates FormData with {extract_image_block_types: "a,b,c"},
* and the server expects it to be {extract_image_block_types[]: ["a", "b", "c"]}.
* Speakeasy will fix this upstream soon.
*
* @param _hookCtx - The context object for the hook, containing metadata about the request.
* @param request - The original Request object.
* @returns A new Request object with modified form data and headers.
*/
beforeRequest(_hookCtx: BeforeRequestContext, request: Request): Promise<Request>;
}
//# sourceMappingURL=FixArrayParamsHook.d.ts.map