title: How to set and handle timeout in Spring WebClient?
body: <p>Spring docs says it is required to configure http client for WebClient manually to set timeouts: <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-client-builder-reactor-timeout" rel="nofollow noreferrer">https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-client-builder-reactor-timeout</a>.
  But since WebClient returns reactive Mono, it's possible (api-wise) to apply <code>.timeout</code> method. </p>
  
  <p>Does it have the same effect?</p>
  
  <p>Moreover, when one uses <code>.timeout</code> method, Reactor's <code>TimeoutException</code> is expected. Will the same error appear in the stream if configuration is done manually i.e. will <code>doOnError(TimeoutException.class, ...)</code> work?</p>