Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected one of [b'HEAD', b'object', b'POST'] when sending pre-flight OPTIONS request #391

Open
gymcoding opened this issue Nov 30, 2020 · 3 comments
Milestone

Comments

@gymcoding
Copy link

The following error occurs when you request http://localhost:6800/schedule.json with Axios:

Error Message

Expected one of [b'HEAD, b'object, b'POST']

The cause is an error caused by pre-flight (OPTIONS) prior to POST request.

How should I handle this?

@Digenis
Copy link
Member

Digenis commented Apr 9, 2021

If it's not returning 405, it's a scrapyd or twisted bug.

If it's returning 405, its an axios bug.

In any case, if this method is useful,
feel free to open a pull request and add it to the webservice

@jpmckinney jpmckinney changed the title Expected one of [b'HEAD', b'object', b'POST'] Expected one of [b'HEAD', b'object', b'POST'] when sending pre-flight OPTIONS request Sep 23, 2021
@jhoanborges
Copy link

+1
image

@jpmckinney
Copy link
Contributor

FYI, there are some links here in an axios issue to avoid sending the OPTIONS request (or to have it swallowed by a proxy): axios/axios#888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants