C
C#2mo ago
Ploxi

asp - Calling another api endpoint

Hey, i have a stream containing a raw request and would like to call the asp.net core request pipeline with it. Has anyone got an idea of archiving that without doing the obvious http request? I would like to avoid the network overhead.
3 Replies
boiled goose
boiled goose2mo ago
you mean deserializing an object and calling a controller/service without exiting from the application? oh wait do you mean deserializing an http request?
Ploxi
Ploxi2mo ago
@WEIRD FLEX i mean i have the raw http request as a stream and want to execute the request it represents I mean parsing the headers is ez but how do i find the endpoint for the route
boiled goose
boiled goose2mo ago
i guess wisest thing would be opening a socket to localhost and sending it but there may be issues even if you were to process request internally in asp net because host and path could be unrecognizable since there could be processing from other parties (like proxies and redirections and such) that would literally be the first like of the request