1
Wenn ich die binaryMediaTypes ['Bild/jpg', 'Text/html'] für eine API durch nodejs konfigurieren möchten. Was ist die richtige API? Es sieht so aus, als ob das Folgende nicht funktioniert.Aktualisierung aws apigateway binaryMediaTypes mit Javascript SDK
const config = JSON.stringify({
"swagger": "2.0",
"info": {
"title": this.apiName
},
"x-amazon-apigateway-binary-media-types": [ 'image/jpg', 'text/html' ]
});
return new Promise((resolve, reject) => {
var params = {
restApiId: apiId, /* required */
mode: 'merge',
body: config
};
this.apiGatewaySDK.putRestApi(params, (err, data) => {
if (err) {
reject(err);
}
else {
resolve('binary set successfully');
}
});
});