Skip to content
HALOWERK

Codewerk

http content negotiation match

Return the best offered media type using supplied Accept quality and wildcard precedence. Local data only.

POST https://code.halowerk.com/v1/http-content-negotiation-match

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
acceptstringYes
offeredarrayYes
Show full input schema
{
  "type": "object",
  "properties": {
    "accept": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1
    },
    "offered": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 256,
        "minLength": 1
      },
      "maxItems": 20,
      "minItems": 0
    }
  },
  "required": [
    "accept",
    "offered"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "accept": "application/json;q=0, application/*;q=0.8, text/plain;q=0.5",
  "offered": [
    "application/json",
    "application/xml",
    "text/plain"
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-18 UTC.

More endpoints in this hub

All endpoints in this hub โ†’