Skip to content

A mechanism to ensure that the parser will only parse requests or only parse responses #11

@bvanderveen

Description

@bvanderveen

As described by @sergey-litvinov on #10:

  • update IHttpParserDelegate just to have common methods between request and response (Headers, Body, etc).
  • create two interfaces IHttpRequestParserDelegate and IHttpResponseParserDelegate that will inherit IHttpParserDelegate with Request\Response specific methods.
  • two constructors for HttpParser.
    • one receives IHttpRequestParserDelegate.
    • one receives IHttpResponseParserDelegate.
  • two member variables
    • one IHttpParserDelegate variable
    • a flag as to whether the delegate is a IHttpRequestParserDelegate or a IHttpResponseParserDelegate
  • in the request/response-specific embedded actions, check the flag on and throw and exception if the value is unexpected

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