@microsoft.azure/autorest.testserver
Version:
Autorest test server.
32 lines • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const api_1 = require("../api");
api_1.app.category("vanilla", () => {
api_1.app.get("/xml/bytes", "XmlGetBytes", (req) => {
return {
status: 200,
body: {
contentType: "application/xml",
rawContent: "<ModelWithByteProperty><Bytes>SGVsbG8gd29ybGQ=</Bytes></ModelWithByteProperty>",
},
};
});
api_1.app.put("/xml/bytes", "XmlPutBytes", async (req) => {
await req.expect.xmlBodyEquals("<ModelWithByteProperty><Bytes>SGVsbG8gd29ybGQ=</Bytes></ModelWithByteProperty>");
return { status: 201 };
});
api_1.app.get("/xml/url", "XmlGetUrl", (req) => {
return {
status: 200,
body: {
contentType: "application/xml",
rawContent: "<ModelWithUrlProperty><Url>https://myaccount.blob.core.windows.net/</Url></ModelWithUrlProperty>",
},
};
});
api_1.app.put("/xml/url", "XmlPutUrl", async (req) => {
await req.expect.xmlBodyEquals("<ModelWithUrlProperty><Url>https://myaccount.blob.core.windows.net/</Url></ModelWithUrlProperty>");
return { status: 201 };
});
});
//# sourceMappingURL=xml-service.js.map