Created
May 21, 2017 01:23
-
-
Save devasat/777397934f565df6264016098049f3fc to your computer and use it in GitHub Desktop.
Call login protected (Java) services using curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# JSESSIONID is used by the server to identify if the user is logged in. Manually login via the browser in the application, | |
# use Chrome developer tool or Firebug to get JSESSIONID and use that in the curl command to invoke the service endpoints. | |
curl --cookie "JSESSIONID=REPLACE_THIS" http://localhost.xom/api/resourcename/id | |
#Example: | |
for i in `seq 1 100` ; do | |
curl --cookie "JSESSIONID=12345678901234567890" http://localhost.xom/api/resourcename/${i}/; echo ""; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment