rubenf
rubenf14mo ago

Middleware

@Tiago Serafim what's an example of a custom middleware ?
3 Replies
Sindre
Sindre14mo ago
So just wanted to throw in my 5 cent here also. This is maybe not something that is super high on the priority list. But I think it could be very useful; In flow you have sleep / retries / cache etc. Sometimes i want to programmatically set them. It would be super nice if it was a wm / windmill object i could send with the result. So if the result is a object with 'wm_sleep: 1000' windmill sleept for 1 sek. Think this could be powerful at least for power users and developers. Would maybe feel better for some developers to know that they can reach for these things programmatically also.
rubenf
rubenf14mo ago
yup that's definitely possible
Tiago Serafim
Tiago Serafim14mo ago
I thought about a middleware in the sense of a HTTP middleware, where we could change the request/response using, for instance, native TS. But Sindre's suggestion is great, would be awesome to change those settings via special object keys.