export type HeadApiEigenschappenUuidArgs = {uuid: string, 'If-None-Match'?: string | undefined}; export type HeadApiEigenschappenUuidOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * De headers voor een specifiek(e) EIGENSCHAP opvragen * * HEAD /eigenschappen/{uuid} */ export const headApiEigenschappenUuid = async (args: HeadApiEigenschappenUuidArgs, options?: HeadApiEigenschappenUuidOptions) => { const {baseUrl = "https://virtserver.swaggerhub.com/michielverhoef/Catalogussen_API/1.3.0", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['If-None-Match'] != null) headers.set("If-None-Match", String(args['If-None-Match'])) const url = `${baseUrl.replace(/\/+$/, '')}/eigenschappen/${encodeURIComponent(String(args.uuid))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "HEAD", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };