I am trying to set up the WADL for an API "Console To-Go", but getting stuck on 1 request where the API I am testing against is a POST with a required variable name with brackets []. If I manually type the field in the body, like field_region[und][value] = "us", it sends through AOK. But if I try to specify that in the WADL, like
<param name="field_region_und_value" apigee:paramName="field_region[und][value]" required="true" type="xsd:string" style="query" default="us">
then Apigee is encoding the brackets in the name, and sending it over as [field_region%5Bund%5D%5Bvalue%5D]
I was looking at http://stackoverflow.com/a/16965623 but just can't seem to figure it out. I tried escaping with apigee:paramName="field_region\[und\]\[value\]" but that just made it worse.
Has anyone else ran in to this issue?
Solved! Go to Solution.
Try:
apigee:paramName="field_region[und][value]"
As far as I can tell, that should work, but please do LMK either way.
This has been forwarded internally at Apigee for follow up.
Try:
apigee:paramName="field_region[und][value]"
As far as I can tell, that should work, but please do LMK either way.
Amusingly, the system ate my escape characters! Instead, use this pastebin to see the correct syntax:
Thanks for the quick replies! But its still not working for me. Trying that pastebin http://pastebin.com/3dJkzbaJ , Apigee is displaying the [ as brackets correctly in the "Body" tab for the Parameter field name, but it is still converting to %5B when sending the field over. See attached screengrab.
Compared to if I just enter a new field in after the fields provided by the WADL, then there I can use brackets in the name and the nesting goes through AOK
Ah, I thought this was just about the display name for the parameter.
I expect that encoding the value is a bug on our side, and I'm not aware of any work around at this time, sorry!
Any idea when this will be fixed?
,Any idea when this will get fixed?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |