Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • D dns-lg
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Stéphane Bortzmeyer
  • dns-lg
  • Issues
  • #10

Use HTTP content negotiation

It would be nice to use HTTP content negotiation, in addition to the explicit "format" parameter.

No idea how to do it in Python: HTTP headers are surprisingly difficult to parse and the header can be as complicated as (example from the RFC):

Accept: text/plain; q=0.5, text/html,
           text/x-dvi; q=0.8, text/x-c

Possible references: http://www.xml.com/pub/a/2005/06/08/restful.html (with Python code), https://github.com/martinblech/mimerender (Python module to implement that), http://pythonpaste.org/httpencode/module-httpencode.mimeparse.html (Python module at a lower level, just does the parsing)

Assignee
Assign to
Time tracking