MCPcopy Index your code
hub / github.com/hydro-dev/Hydro / binary

Method binary

framework/framework/server.ts:235–240  ·  view source on GitHub ↗
(data: any, name?: string)

Source from the content-addressed store, hash-verified

233 }
234
235 binary(data: any, name?: string) {
236 this.response.body = data;
237 this.response.template = null;
238 this.response.type = 'application/octet-stream';
239 if (name) this.response.disposition = `attachment; filename="${encodeRFC5987ValueChars(name)}"`;
240 }
241
242 holdFile(name: string | File) {
243 this.context.holdFiles.push(name);

Callers 5

getMethod · 0.80
displayFunction · 0.80
getMethod · 0.80
displayFunction · 0.80
allMethod · 0.80

Calls 1

encodeRFC5987ValueCharsFunction · 0.70

Tested by

no test coverage detected