Skip to content

Commit

Permalink
fix http source
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Mar 10, 2021
1 parent 7977dc8 commit 718a50f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/http-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following table summarizes the configuration options available for the `http
|===
| Property| Name| Description| Type| Default| Example
| *url {empty}* *| URL| The URL to fetch for data| string| | `"https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json"`
| contentType| Content type| The content type of the resource| string| `"application/json"`|
| contentType| Content type| The content type accepted for the resource| string| `"application/json"`|
| period| Period between updates| The interval between fetches in milliseconds| integer| `10000`|
|===

Expand Down
8 changes: 6 additions & 2 deletions http-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
camel.apache.org/provider: "Apache Software Foundation"
labels:
camel.apache.org/kamelet.type: "source"
camel.apache.org/requires.runtime: "camel-quarkus"
spec:
definition:
title: "HTTP Source"
Expand All @@ -22,14 +23,17 @@ spec:
default: 10000
contentType:
title: Content type
description: The content type of the resource
description: The content type accepted for the resource
type: string
default: "application/json"
url:
title: URL
description: The URL to fetch for data
type: string
example: "https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json"
pattern: "^(http|https)://.*"
dependencies:
- "camel-quarkus:http"
flow:
from:
uri: "timer:fetch"
Expand All @@ -39,5 +43,5 @@ spec:
- set-header:
name: "Accept"
constant: "{{contentType}}"
- to: "netty-http:{{url}}"
- to: "{{url}}"
- to: "kamelet:sink"

0 comments on commit 718a50f

Please sign in to comment.