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

feat: print emit response output if it's a cloudevent #444

Merged
merged 1 commit into from
Jul 28, 2021

Commits on Jul 27, 2021

  1. feat: print emit response output if it's a cloudevent

    The CloudEvent SDK will provide any event included in the response as a
    return value from `Request()`. If it does, print it out. It makes the
    experience nicer.
    
    For example, if I run the default TypeScript event function locally, this
    is what `kn emit...` looks like.
    
    ```
    ❯ ./func emit --sink local --data '{"hello": "world"}'
    Context Attributes,
      specversion: 1.0
      type: echo
      source: function.eventViewer
      id: d7d81ccc-a365-4433-be6b-7edfa43ca360
      time: 2021-07-27T18:57:03.147Z
      datacontenttype: application/json; charset=utf-8
    Data,
      {
        "hello": "world"
      }
    ```
    
    Signed-off-by: Lance Ball <lball@redhat.com>
    lance committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    8a85fa3 View commit details
    Browse the repository at this point in the history