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

Can't make insert when calls to API make with Doctrine Api Plataform. Shows MIME not supported error. #75

Open
Bizkaitarra opened this issue Aug 2, 2018 · 1 comment

Comments

@Bizkaitarra
Copy link

When I try to use this driver to call an standard Doctrine API plataform works well with selection operations but I can't make any insert.

When I try to insert API complais about the MIME Type:

The content-type \u0022application/x-www-form-urlencoded\u0022 is not supported. Supported MIME types are \u0022application/json\u0022

I tried to make Doctrine API Plataform to work with x-www-form-urlencoded but I can't:

https://api-platform.com/docs/core/form-data/#accept-applicationx-www-form-urlencoded-form-data

¿Is there anything I can configure in Doctrine Rest Driver to send request using json and not x-www-form-urlencoded?

@TobiasHauck
Copy link
Member

As you can see here:
https://github.com/CircleOfNice/DoctrineRestDriver/blob/master/Types/CurlOptions.php#L35

The drivers default content-type is application/json

So if it's not sending json you may override that somewhere in your application. What's your drivers config? Can you show me?

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

No branches or pull requests

2 participants