-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add HTTP Target #78
Add HTTP Target #78
Conversation
f5e6adf
to
0073a11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the nitpicky feedback
docs/targets/http.md
Outdated
|
||
Responses from the remote endpoint will generate new [CloudEvents][ce] that will be returned to TriggerMesh. Most probably those response events should not be re-processed by the HTTP Target. | ||
|
||
It is important that the Trigger that subscribes the HTTP Target to the Broker configure the appropiate filters to avoid these loops. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit picky - sorry appropiate
here should beappropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
7bf9f2d
docs/targets/http.md
Outdated
|
||
| Field | Description | Example | | ||
|--- |--- |--- | | ||
| query_string | Key/value pairs formated as query string | `name=jane&lastname=doe` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicky - formated
here should be formatted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gracias!
7bf9f2d
docs/targets/http.md
Outdated
- `CA Certificate` CA certificate configured for TLS connection. | ||
- `Skip Verify` skips remote server TLS certificate verification. | ||
- `Username` when using basic authentication. | ||
- `Password` when using basic authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this require a secret?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does, fixing!
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございました
9a886ca
docs/targets/http.md
Outdated
|
||
## Trigger Configuration | ||
|
||
Responses from the remote endpoint will generate new [CloudEvents][ce] that will be returned to TriggerMesh. Most probably those response events should not be re-processed by the HTTP Target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Most probably
part sounds confusing. You may need to mention to the user how to setup a trigger filter to ensure the http target doesn't end up reprocessing events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right.
Most probably
should be out.
I don't want to show here how to configure Triggers, we should have a generic dedicated page for that. Skipping for now and opening a follow up issue if that's ok with you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
どいたしまして!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the confusing part.
634e10c
Waiting for your opinion on the trigger. I would like that one outside because transformation, infraJS, and every target that generates a response will be in the same situation. We might need a section for communication elements where we detail brokers and triggers for now, channels and subscriptions in the future.
Would suggest perhaps a screenshot or two of the targets page, but otherwise looking good. |
there is a reason I'm not adding screenshots ... I hope we move secrets somewhere else, or group them with passwords and related fields. I hope we discuss that soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like what you did. Left a few more minor nits, and am approving this for when you get it taken care of.
docs/targets/http.md
Outdated
- `Password` when using basic authentication needs to reference the aforementioned password secret. | ||
- `Headers` is a set of key/value pairs that will be set withing the HTTP request. | ||
|
||
Save the target, fill the rest of the bridge components and press `Submit Bridge`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...components,
and press...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/targets/http.md
Outdated
- HTTP Target is interested in events whose type is `calendar.pto.request`. | ||
- The response from workday will generate a CloudEvent type `workday.pto.response` and source `workday.instance1` | ||
|
||
Trigger should be configured to avoid feeding these responses into the HTTP Target, a filter key `type` and value `calendar.pto.request` would provide such protection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
...responses into the HTTP Target. A
filter key type
and value calendar.pto.request
would provide such protection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/targets/http.md
Outdated
|
||
The HTTP Target expects a cloud event request that complements the Target configured values. | ||
|
||
There is no requirement regarding the type header value, any cloud event containing the expected data is valid to process. Data needs to be a JSON structure that might contain these optional fields: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "...header value. Any cloud event..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/targets/http.md
Outdated
|
||
|
||
| Field | Description | Example | | ||
|--- |--- |--- | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need trailing spaces as mkdocs
will format it correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nitpicks 😛
docs/targets/http.md
Outdated
|
||
The HTTP event target sends requests to arbitrary URLs and wraps responses in CloudEvents back to the caller. HTTP endpoints that are unauthenticated, use basic authentication or use custom header values for authentication, can be integrated using this target. | ||
|
||
Responses from external HTTP endpoints are converted into [CloudEvents][ce] and sent as a reply to the TriggerMesh Broker/Channel. It is important that the HTTP target filters received events and cares about response event type and event source to avoid loops where those responses might end up being processed by the HTTP Target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need to link to CloudEvents
page every time it;s mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not, I'll set it only once at the first mention and remove all other links if that's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/targets/http.md
Outdated
{"body": "{\"records\":[{\"value\":{\"this\":{\"is\": \"sparta\"}}}]}"} | ||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra new-line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Sameer Naik <sameer@triggermesh.com>
Co-authored-by: Sameer Naik <sameer@triggermesh.com>
lgtm! approved |
Add HTTP Target documentation.
closes #43