Skip to content

Not accepting content type application/xml #9

@anshi1694

Description

@anshi1694

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
            }
        }
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions