Skip to content

Commit

Permalink
Express workflow fix: Add Content Type to curl call (#4885)
Browse files Browse the repository at this point in the history
* added content type header to example commands on index.ts

* removed console logging
  • Loading branch information
mj6uc authored May 8, 2024
1 parent 181d2d2 commit 63ac3ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/express-workflow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ app.post('/workflows/:workflowId', (req, res) => {
const actor = createActor(machine, {
snapshot: snapshot as AnyMachineSnapshot
}).start();

actor.send(event);

// @ts-ignore
Expand Down Expand Up @@ -81,7 +80,7 @@ app.get('/', (_, res) => {
<p>Start a new workflow instance:</p>
<pre>curl -X POST http://localhost:4242/workflows</pre>
<p>Send an event to a workflow instance:</p>
<pre>curl -X POST http://localhost:4242/workflows/:workflowId -d '{"type":"TIMER"}'</pre>
<pre>curl -X POST http://localhost:4242/workflows/:workflowId -d '{"type":"TIMER"}' -H "Content-Type: application/json" </pre>
<p>Get the current state of a workflow instance:</p>
<pre>curl -X GET http://localhost:4242/workflows/:workflowId</pre>
</body>
Expand Down

0 comments on commit 63ac3ad

Please sign in to comment.