-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/10/10 3:10 PM, Laurent Daudelin wrote:
> Hello all.
> 
> I'm downloading a web page that contains a form with NSURLConnection. The 
> form contains a few fields that I can fill with values. 
> Here is the form part:
> 
> <form id="loginform" action="/openid/loginsubmit" method="post" 
> style="position:relative; style="position:relative;"">
...
> Now, how would I submit it back to the server?

You're basically asking how to send a POST request back to the server
('method="post"').

See, e.g.,
http://www.conceitedcode.com/2010/06/sending-post-data-using-nsurlconnection/

I should point out, though, that this approach is fragile - particularly
if the remote site is not one you control.  If the site changes its form
structure (particularly, field names) things will suddenly break.  Best
to use a published web API if available.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFM2zLQaOlrz5+0JdURApq8AJ9x1W45vevEjGgADygJ8KwxRZNj1ACcDLmp
vdozxmoYl8mh0aFNKtCjYq0=
=zb80
-----END PGP SIGNATURE-----
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to