@microsoft.azure/autorest.testserver
Version:
Autorest test server.
36 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const api_1 = require("../api");
const bytes = Buffer.from([255, 254, 253, 252, 251, 250, 249, 248, 247, 246]);
api_1.app.category("vanilla", () => {
api_1.app.put("/byte/nonAscii", "putByteNonAscii", (req) => {
req.expect.bodyEquals(bytes.toString("base64"));
return {
status: 200,
};
});
api_1.app.get("/byte/null", "getByteNull", (req) => {
return {
status: 200,
};
});
api_1.app.get("/byte/empty", "getByteEmpty", (req) => {
return {
status: 200,
body: (0, api_1.json)(""),
};
});
api_1.app.get("/byte/nonAscii", "getByteNonAscii", (req) => {
return {
status: 200,
body: (0, api_1.json)(bytes.toString("base64")),
};
});
api_1.app.get("/byte/invalid", "getByteInvalid", (req) => {
return {
status: 200,
body: (0, api_1.json)("::::SWAGGER::::"),
};
});
});
//# sourceMappingURL=byte.js.map