jeudi 9 mars 2017

C# Managing Http server requests url branching

I'm writing HTTP server, that would manage following requests. Each of them should return corresponding JSON object.

GET /command1/command2/command3
GET /command1/<ip-port>/command3
GET /command4//command3
GET /command5/

and so on...
How should I manage this branching of commands?
It seems to me I can easily deal with this using regex. Or maybe I should choose some pattern like State?

Aucun commentaire:

Enregistrer un commentaire