create-client
create-client copied to clipboard
Error 406 : Not acceptable
Hi,
i've an error 406 Not Acceptable when i try this command :
generate-api-platform-client -g vue http://my-project.local/api src/
This is my response :
{ api:
Api { entrypoint: 'http://my-project.local/api', resources: [] },
error:
{ response:
Body {
url: 'http://my-project.local/api',
status: 406,
statusText: 'Not Acceptable',
headers: [Headers],
ok: false,
body: [PassThrough],
bodyUsed: false,
size: 0,
timeout: 0,
_raw: [],
_abort: false } },
response:
Body {
url: 'http://my-project.local/api',
status: 406,
statusText: 'Not Acceptable',
headers: Headers { _headers: [Object] },
ok: false,
body:
PassThrough {
_readableState: [ReadableState],
readable: true,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: true,
_transformState: [Object] },
bodyUsed: false,
size: 0,
timeout: 0,
_raw: [],
_abort: false },
status: 406 }
I don't understand why....
Thanks for your help
Benoit.
Same problem
see: https://api-platform.com/docs/client-generator/react/#generating-a-progressive-web-app
Try to enable Hydra (json-ld) in your application.
Don't forget to clear cache.