toenuff / flancy

A micro web framework for Windows PowerShell
MIT License
189 stars 21 forks source link

content-type #44

Open phand00 opened 7 years ago

phand00 commented 7 years ago

Is it possible to set content-type on response?

I tried

$Response.ContentType = "application/json" or $Response.Headers["content-type"] = "application/json"

thanks

phand00 commented 7 years ago

here is my version of flancy.psm1 that support custom content-type defined by the route map... if nothing is specified for a particular path the default text/html is implemented...