Skip to content

Conversation

@dmilov
Copy link
Contributor

@dmilov dmilov commented Apr 26, 2021

Simplify READEME.md. Address issue #18

  • Remove unnecessary details.
  • Update Examples
  • Replace Add with Set verbs as a result of renaming module's finctions.

Signed-off-by: Dimitar Milov dmilov@vmware.com

@dmilov dmilov requested a review from embano1 April 26, 2021 06:43
embano1
embano1 previously approved these changes Apr 27, 2021
README.md Outdated
Time : 4/26/2021 9:00:45 AM
Type : com.example.object.deleted.v2
```
#### Add Custom Format Data to a CloudEvent object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to live under the XML example (heading level)?
Can we also provide an example output as we do for JSON/XML above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's supposed to be separate.
Adding the output

### Send CloudEvent object to HTTP server
```powershell
Invoke-WebRequest -Method POST -Uri 'http://my.cloudevents.server/' -Headers $cloudEventBinaryHttpMessage.Headers -Body $cloudEventBinaryHttpMessage.Body
Invoke-WebRequest -Method POST -Uri 'http://my.cloudevents.server/' -Headers $cloudEventStructuredHttpMessage.Headers -Body $cloudEventStructuredHttpMessage.Body
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the example uses a Structured CloudEvent, are Headers actually used at all in this example? What is contained in the Headers of a structured CE? Just curious :)

Do we need to show two examples, e.g. using Headers+Body for binary mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Headers follow the https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md#3-http-message-mapping. In structure mode the ContentType header is application/cloudevents

Do we need to show two examples, e.g. using Headers+Body for binary mode?
Not sure. I can leave only the structure mode?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

embano1
embano1 previously approved these changes Apr 27, 2021
Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT work!

@embano1
Copy link
Member

embano1 commented Apr 27, 2021

Do you want to squash the commits before merging? There's no option to squash and create a merge commit in Github directly :/

@dmilov dmilov force-pushed the topic/dmilov/update-readme-examples branch from e22a029 to 7ace4ab Compare April 28, 2021 05:16
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
@dmilov dmilov force-pushed the topic/dmilov/update-readme-examples branch from 7ace4ab to 3a9010a Compare April 28, 2021 05:36
Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏

@embano1 embano1 merged commit 74e2cc2 into cloudevents:main Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants