glutinum-org / Glutinum

MIT License
30 stars 3 forks source link

incorrect type for `Request#is` #17

Open joprice opened 2 days ago

joprice commented 2 days ago

The return type for the is method on Request is currently string option, which handles the presence of a body, but when the content-type header is missing, the return type will be a boolean: If the request has no body, returns null. Returns false otherwise.. So it seems the expected return type would be U2<option<string>, bool>.

https://github.com/glutinum-org/Glutinum/blob/52b2f2487aa2195fb04751df72f607aa6980f4b7/glues/ExpressServeStaticCore/src/Glutinum.ExpressServeStaticCore.fs#L1435

MangelMaxime commented 2 days ago

@joprice Could you please send a PR?

The files in this repository have been crafted manually so we can make manual improvements.

joprice commented 2 days ago

Sounds good. I can put a pr up