Skip to content

mu invoke: support web requests #25

@rsyring

Description

@rsyring

It could be helpful to be able to invoke the local docker runtime in a similar way to how the API gateway would invoke it. This could be an option to mu invoke like:

$ mu invoke --wsgi-url /hello-world

Invoke would then need to construct a minimal dictionary patterned after what the WSGI handler expects. An example of that can be found at mu_tests.data.event_wsgi.

But I wouldn't spend a whole lot of time adding extra options to be able to cover all the different ways a web request might need to be constructed. If that needs to be tested, just do a dev deployment and test it with a browser or http cli client. I guess, we could support something like a --event-json=/some/file/path.json like option which could be a WSGI event. But, at that point, it's easier/faster to just add a test for it and skip trying to sending it through the docker runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions