Reputation: 3262
I have a bunch of http response files and want to simulate with them a server. For example :
If I use the browser http://localhost:2323/response1 I get the response1 file etc..
Is this issue possible to do with Mojolicious?
Does Mojolicious support an option to return an http response directly?
Upvotes: 1
Views: 166
Reputation: 132758
It sounds like you want what we used to call "no parsed header" (nph) responses where you completely construct the response and the server doesn't mess with it. you have to supply everything and do it correctly, including the correct line endings.
Mojolicious::Command::CGI has an option for that, but I've never used it. You don't want Mojolicious if you want to do it all yourself, though. Would you like to parse the files and construct Mojo responses from that?
Is this something you need to serve to the public, need just for you, or for a small job? Writing your own server to do this wouldn't be that hard.
Upvotes: 1