Skip to main content
1 of 3

What is the right way to make http request according to a slider value?

I am designing a basic software for smart wireless lighting systems and I have a slider for the brightness setting of a light, the system has a RESTful API so I can listen the changes on the slider value and make a http request with the value to the system. The thing is, it seems utterly naive to make new http request with every single value change.

For example if the user changes the slider value from 70 to 20, the software would make 50 http requests.

How do people tackle this kind of problem do I wait after each request for a defined duration? What is the best practice to overcome making almost hundred requests?