Making HTTP Client Requests Generic with `@effect/platform`
Hey again! Exploring the
Where
I'm wondering whether it is possible to make the above code generic, so instead of Post we use a generic type for code reuse, as
The function signature would maybe look something like the below, however I cannot figure out what the generic constraint should be:
Thanks for your help!
@effect/platform package we find this piece of code under "HTTP Client":Where
Post is defined as.I'm wondering whether it is possible to make the above code generic, so instead of Post we use a generic type for code reuse, as
getPostAndValidate represents a pretty common flow for fetching a typed data object.The function signature would maybe look something like the below, however I cannot figure out what the generic constraint should be:
Thanks for your help!
