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

Not accepting content type application/xml #9

Open
anshi1694 opened this issue Mar 15, 2019 · 0 comments
Open

Not accepting content type application/xml #9

anshi1694 opened this issue Mar 15, 2019 · 0 comments

Comments

@anshi1694
Copy link

Working fine for content type application/json, but when passing application/xml giving following error:
{"statusCode":415,"error":"Unsupported Media Type","message":"Unsupported Media Type"}

Code used:

 server.route({
        method: "POST",
        path: "/bar",
        config: {
            auth:false,
            payload: {
                output: "data",
                parse: false,
                allow: "application/xml"
            },
            plugins: {
                websocket: true
            }
        },
        handler: (request, h) => {
            let {
                mode
            } = request.websocket()
            console.log(request.payload)
            return {
                at: "bar",
                mode: mode,
                seen: request.payload
            }
        }
    })
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

1 participant