Ok, I guess I also need to figure out where to store the images, and how to pull them into HE so that I can then return them at the endpoint...Any example apps that you know of that do something similar?
Maybe this is what I need?
I tried this but it returns a null response. Not sure what's different here than in the example from that thread.
void getImage() {
def params = [
uri: "https://raw.githubusercontent.com/lnjustin/wallpaper/master/cropped%20dreamstime_l_155161055.jpg",
headers: ["Accept": "image/jpeg"]
]
asynchttpGet(sendHttpResponse, params)
}
void sendHttpResponse(response, data) {
if(response.data != null) {
log.debug "base 64 data size ${response.data.length()}"
byte[] imageBytes = response.data.decodeBase64()
log.debug "bytes size = ${imageBytes.size()}"
render contentType: "image/jpeg", data: imageBytes, status: 200
}
else log.debug "Null response"
}