• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Submitting a web form?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Submitting a web form?


  • Subject: Re: Submitting a web form?
  • From: Conrad Shultz <email@hidden>
  • Date: Wed, 10 Nov 2010 16:03:28 -0800

-----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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Submitting a web form?
      • From: Laurent Daudelin <email@hidden>
References: 
 >Submitting a web form? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Submitting a web form?
  • Next by Date: CALayer convertPoint:toLayer: affecting animations bug?
  • Previous by thread: Submitting a web form?
  • Next by thread: Re: Submitting a web form?
  • Index(es):
    • Date
    • Thread