postlight / parser-api

🚀 A drop-in replacement for the Postlight Parser API.
https://reader.postlight.com/
Apache License 2.0
282 stars 113 forks source link

Does not seem to support contentType #36

Open nitinthewiz opened 4 years ago

nitinthewiz commented 4 years ago

Expected Behavior

API endpoint should allow contentType as text or markdown

Current Behavior

It seems the contentType argument is not present in the code, as the code only takes url and html from the request -

https://github.com/postlight/mercury-parser-api/blob/b6a04af54b3d734e96aa72e487659c087ba09295/src/parse-html.js#L6

Steps to Reproduce

  1. Hosted on AWS Lambda as per instructions, can provide link if needed.
  2. I just tried to make a GET and POST calls, with the contentType set to text and that doesn't seem to work

Detailed Description

Possible Solution

Code should be updated to accept opts as per Mercury parse - https://github.com/postlight/mercury-parser/blob/b0e708aac6a4e7e10986448a132d60df57c45b00/src/mercury.js#L13