UNPKG

@microsoft.azure/autorest.testserver

Version:
21 lines 942 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const api_1 = require("../api"); const services_1 = require("../services"); api_1.app.category("vanilla", () => { api_1.app.post("/binary/file", "BodyBinaryFile", (req) => { req.expect.containsHeader("content-type", "application/json"); req.expect.bodyEquals({ more: "cowbell" }); return { status: 200 }; }); api_1.app.put("/binary/octet", "BodyBinaryOctet", (req) => { req.expect.containsHeader("content-type", "application/octet-stream"); req.expect.bodyNotEmpty(); return { status: 200 }; }); api_1.app.get("/binary/error", "BodyBinaryError", async (req) => { await services_1.coverageService.track("vanilla", "BodyBinaryError"); return { status: 400, body: (0, api_1.json)({ status: 400, message: `I failed on purpose` }) }; }); }); //# sourceMappingURL=binary-files.js.map