Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix http source to use camel-http #48

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"