Skip to content

Instantly share code, notes, and snippets.

@Xliff
Created August 5, 2021 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xliff/ceb6f6a50935289dddb2ad82173eef21 to your computer and use it in GitHub Desktop.
Save Xliff/ceb6f6a50935289dddb2ad82173eef21 to your computer and use it in GitHub Desktop.
Handling POST requests containing JSON data in Cro

Will this work for Cro::HTTP::Router if the keys of the JSON request match the attributes of the object?

 post -> 'add' {
    request-body -> Instance $i {
      createInstance($i);
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment