public static HttpBuilder configure ( final Function < HttpObjectConfig , ? extends HttpBuilder > factory , @ DelegatesTo ( HttpObjectConfig . class ) final Closure closure ) { HttpObjectConfig impl = new HttpObjectConfigImpl ( ) ; closure . setDelegate ( impl ) ; closure . setResolveStrategy ( Closure . DELEGATE_FIRST ) ; closure . call ( ) ; return factory . apply ( impl ) ; }
Creates an HttpBuilder configured with the provided configuration closure using the defaultFactory as the client factory .