Skip to content

magic initializer-list for HTTP ABNF #217

@vinniefalco

Description

@vinniefalco

Often it is desired to specify a list of elements from the HTTP RFC ABNF. For example, consider this

cors.allowedHeaders = "Content-Type,X-Referred-By"

It would be better if we could write

cors.allowedHeaders = { field::content_type, "X-Referred-By" };

There is a prototype of this system here
https://github.com/cppalliance/http_proto/blob/develop/test/unit/server/cors.cpp#L94

It needs to be developed into a complete solution. Custom strings that do not pass validation should cause an exception to be thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions