I'm having some issues retrieving a form parameter in an AssignMessage policy.
The API is called via a POST request, which has a plain-text body consisting of:
sid=12345678
With the following policy (first policy in the pre-flow), all variables are unresolved.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AssignMessage name="assign_config_variables"> <AssignVariable> <Name>sid</Name> <Ref>request.formparam.sid</Ref> <Value>unknown</Value> </AssignVariable> <AssignVariable> <Name>formparam</Name> <Ref>request.formparam</Ref> <Value>unknown</Value> </AssignVariable> <AssignVariable> <Name>formstring</Name> <Ref>request.formstring</Ref> <Value>unknown</Value> </AssignVariable> </AssignMessage>
How would I retrieve/use the value of 'sid' in a policy or condition?
Solved! Go to Solution.
Please set the content-type as application/x-www-form-urlencoded.
Use this and try to extract form params remember content-ype should be application/x-www-form-urlencoded.
<AssignVariable> <Name>sid</Name> <Ref>request.formparam.sid</Ref> <Value>unknown</Value> </AssignVariable>
<AssignVariable> <Name>formparam</Name> <Ref>request.formparam</Ref> <Value>unknown</Value> </AssignVariable> <AssignVariable> <Name>formstring</Name> <Ref>request.formstring</Ref> <Value>unknown</Value> </AssignVariable>
can you remove the above and try....you altering formparam in above assign varaible.
Please set the content-type as application/x-www-form-urlencoded.
Use this and try to extract form params remember content-ype should be application/x-www-form-urlencoded.
<AssignVariable> <Name>sid</Name> <Ref>request.formparam.sid</Ref> <Value>unknown</Value> </AssignVariable>
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |