rest - (Ab?)using http custom headers to return metadata about an entity -
if, in addition binary image data, want return data structure in same http response message. data structure describe image further receiving application use information process image if wanted to, way it?
when transmitting data structure without image data, i'd return json.
- like other image, image/... content-type, adding custom http response headers containing data
- using application/json (or xml or ...) containing json data structure , field containing encoded binary image data
- as metadata in image binary itself, although specific type of image used (png different gif etc.)
1) easiest me implement both server-side , client-side, wonder, if that's not abusing http headers, otoh. maybe similar of standard http headers etags.
2) , 3) aren't easy use both client- , server-side, , 2) not efficient (cpu, bandwidth) 1) , 3).
the nice thing 1) , 3) clients unaware of metadata (js client?) @ least display image.
any objections 1) http police? other option missed?
4) content-type = multipart/mixed. if you're using browser, see here.
Comments
Post a Comment