Source code for mlapi.parsers.imageParser

from flask_api.parsers import BaseParser
# TODO: They should do something actually
[docs]class JpegImageParser(BaseParser): """ Image parser. """ media_type = 'image/jpeg'
[docs] def parse(self, stream, media_type, **options): """ Simply return a string representing the body of the request. """ return stream
[docs]class PngImageParser(BaseParser): """ Image parser. """ media_type = 'image/png'
[docs] def parse(self, stream, media_type, **options): """ Simply return a string representing the body of the request. """ return stream