Hi, I am using Pommo for my mailing list, unfortunatelly Pommo doesn't provide an HTTP API but provides and embedable subscription form I can put on my site. But posting using that form takes me out of my site and that is unacceptable for me.
So I want to do the field validation in Rails and then use curl to post the values.
The fields Pommo generates looks like this:
<input type="text" size="32" maxlength="60" name="Email" id="email" value="" />
<input type="text" size="32" name="d[1]" id="field1" />
<input type="text" size="32" name="d[2]" id="field2" />
<input type="text" size="32" name="d[3]" id="field3" value="México" />
Which produces the following params in Rails:
{ "d"=>{"1"=>"Macario", "2"=>"Ortega", "3"=>"México", "5"=>""}, "Email" => [email protected] ... }
Now I can validate the format of the email and if the required fields are present but I don't know how to encode this hash as string for posting using curl.
Is this kind of data structure encoding standar or dependant on application? Does it has a name?