Skip to content

Commit

Permalink
Add a function that takes HttpClient as a parameter #16
Browse files Browse the repository at this point in the history
  • Loading branch information
alialbaali committed Jul 23, 2022
1 parent 74fab77 commit e45a23e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public class KamelConfigBuilder {

}

/**
* Adds an Http fetcher to the [KamelConfigBuilder] using the specified [client].
*/
public fun KamelConfigBuilder.httpFetcher(client: HttpClient): Unit = fetcher(HttpFetcher(client))

/**
* Adds an Http fetcher to the [KamelConfigBuilder] using the specified [engine]
* and an optional [block] for configuring this client.
Expand Down Expand Up @@ -103,7 +108,8 @@ public fun KamelConfigBuilder.urlMapper(): Unit = mapper(URLMapper)
/**
* Copies all the data from [builder] and uses it as base for [this].
*/
public fun KamelConfigBuilder.takeFrom(builder: KamelConfigBuilder): KamelConfigBuilder = takeFrom(builder.build())
public fun KamelConfigBuilder.takeFrom(builder: KamelConfigBuilder): KamelConfigBuilder =
takeFrom(builder.build())

/**
* Copies all the data from [config] and uses it as base for [this].
Expand Down

0 comments on commit e45a23e

Please sign in to comment.