Created
January 30, 2013 21:07
-
-
Save scottwillson/4676993 to your computer and use it in GitHub Desktop.
If you're using Tsung to test a Rails site that has CSRF protection, Tsung needs to parse the authenticity_token and submit it when POSTing. I could only find outdated examples. The snippet below works.
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
<request> | |
<dyn_variable name="authenticity_token" ></dyn_variable> | |
<http url="/registrations/new" version="1.1" method="GET"></http> | |
</request> | |
<request subst="true"> | |
<http url="/registrations" method="POST" version="1.1" | |
contents="authenticity_token=%%_authenticity_token%%&first_name=Jane"/> | |
</request> |
nirname
commented
Jul 19, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment