arXiv / arxiv-classifier

Facebook contributed classifier for abstracts
14 stars 2 forks source link

Implement routes module for classifier service #1

Closed erickpeirson closed 5 years ago

erickpeirson commented 5 years ago

We require a module at classifier/routes.py that defines two HTTP routes:

Note that the routes are responsible for:

Note that (per #2) the classify controller requires an IO[bytes] containing the raw body of the request. If the content-type is not set, this may be request.stream. Otherwise, just use an io.BytesIO wrapping request.data. See https://github.com/arXiv/arxiv-submission-preview/blob/4c4e28261bc2ebaf5ce223b4a4ea7249fec5ae8f/preview/routes.py#L67-L80 for an example.