How to change timeout of HTTP POST?

I would like to do an HTTP POST (firmware upload) which takes longer than 5 seconds. What is the best way to set a longer timeout? Can I call `libwebsocket_set_timeout()` from some callback? I tried calling it from the `LWS_CALLBACK_HTTP` callback, but it didn't seem to make a difference. I guess it's getting overwritten after that.