Mock a GET request for an image

0

I'd like to mock a get request for an image so that it could be used in an html img element e.g. <img src="https://xyz.execute-api.us-east-1.amazonaws.com/test/log/ffs.png">

In my Integration Response I've got a Mapping Template for Content-Type image/png

{
"isBase64Encoded":  true,
"body": 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=='
}

But the logs keep telling me: Execution failed due to configuration error: Unable to transform request

All the examples out there seem to be around using S3 or Lambda to return the images rather than hard coding them.

It maybe that I am attempting the impossible - but I can't see what I am doing wrong.

Alinea
gefragt vor 2 Jahren49 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen