lever / postings-api

API documentation and examples for the lever postings REST API
184 stars 40 forks source link

API returning HTML response even when mode=json is enabled #45

Open pencerw opened 4 years ago

pencerw commented 4 years ago

Hey Lever-

About an hour ago, I tried the following command and received a JSON response: curl https://api.lever.co/v0/postings/originio The response is too long to post, but here's the beginning and end: [{"additionalPlain":"Nice to have:\nAdditive manufacturing and/or 3D printing experience\n"..."applyUrl":"https://jobs.lever.co/originio/39446629-e634-42b4-af62-39332fec714e/apply"}]

But now, even if I use the following command I receive an HTML response: curl https://api.lever.co/v0/postings/originio&mode=json The response is even longer but it starts with: <!DOCTYPE html><head prefix="og: http://ogp.me/ns#"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><title>Origin</title><meta name="twitter:card" value="summary"><meta name="twitter:title" content="Origin"><meta...

...Am I doing something wrong? I have the same results with Python Requests.

Datamined commented 4 years ago

Approve, that sometimes this is happenning. I also receive 400 Error and 'text/html' response header with long HTML in the body.

sammydigits commented 4 years ago

Hi Lever, any progress on fixing this, or any workarounds? Thanks