Skip to content

Conversation

@cyborgsimon
Copy link

  • the response mime type will be checked against the HTTP Accept Header
  • the response mime type will be set for the response
  • the request mime type will checked against the Content Type of the request

example:

dispatcher().map("(PUT|POST)", "text/html", "application/x-www-form-urlencoded", "/res_7/(a(\\d+))/(a(\\d+))/(a(\\d+))", &disp::p_3,this,2,4,6);

This will e.g. map correctly with a request with:

  • PUT as HTTP request method
  • text/html,text/xhtml as HTTP Accept
  • application/x-www-form-urlencoded; charset=utf-8 as HTTP request content type

More information / examples can be found in the code documentation (url_dispatcher.h) or the unit tests (url_mapper_test.cpp)

…me type and request mime type in addition to method and url

- the response mime type will be checked against the HTTP Accept Header
- the response mime type will be set for the response
- the request mime type will checked against the Content Type of the request
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

Successfully merging this pull request may close these issues.

1 participant