Skip to content

Instantly share code, notes, and snippets.

@nateyolles
Created November 17, 2015 01:46
Show Gist options
  • Save nateyolles/90ed86ca221c2b39310a to your computer and use it in GitHub Desktop.
Save nateyolles/90ed86ca221c2b39310a to your computer and use it in GitHub Desktop.
cURL simulations of submitted AEM component dialogs using SlingPostServlet suffixes
# Simulated checked checkbox. The value is saved as a Boolean type with the value of true.
curl http://localhost:4502/test -u admin:admin -Fcheck="true" -Fcheck@TypeHint="Boolean"
# Simulated unchecked checkbox. No value for "check" is submitted and the JCR property value remains unchanged.
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean"
# Simulated unchecked checkbox with Delete suffix. The JCR property is removed.
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" -Fcheck@Delete="true"
# Simulated unchecked checkbox with TypeHint, DefaultValue and UseDefaultWhenMissing suffixes.
# The JCR property is saved as a Boolean type with the value of false.
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" -Fcheck@DefaultValue="false" -Fcheck@UseDefaultWhenMissing="true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment