Skip to content

Custom Content-Type negotiation issues #833

@k0ality

Description

@k0ality

I want to use custom Content-Type in Format, DefaultFormat, Input Body, Output. It's pure json, but I'm restricted from "application/json", "json" types.

When I specify my custom type in Input Body struct with "contentType" tag I get next results:

  • HTTP 415 when I send no "Content-Type" header in request
  • crash if I add "Content-Type" header in request

Here's a runnable playground example: https://go.dev/play/p/FWy4_38Rh9z

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