Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6603279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:59:16+00:00 2026-05-25T18:59:16+00:00

I have this code in Python that was quite simple to do with mechanize

  • 0

I have this code in Python that was quite simple to do with mechanize to just go into a URL and click the submit button:

from mechanize import ParseResponse, urlopen, urljoin

response = urlopen("http://www.somesite.com/somepage")
forms = ParseResponse(response, backwards_compat=False)
form = forms[0]

print urlopen(form.click()).read()

Now the question is: Is there any library/simple method to do this in Objective-C?

I’ve seen some more or less of similar examples with NSURL that where quite big, but since I’ll be doing this to a bunch of diferent sites, it doesn’t look like a simple thing to go torugh some dozens of code lines to each one of them and debug everything if there is some easy way like with mechanize.

Regards,
Bruno

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:59:17+00:00Added an answer on May 25, 2026 at 6:59 pm

    Check this site: http://allseeing-i.com/ASIHTTPRequest/
    It is not actually what you want, but you can send the POST/GET values to the form action page.

    if you have a page http://test.com/form.php with following form:

    <form name="login" method="POST" action="action.php">
        <input name="username"><br />
        <input name="password"><br>
        <input type="submit">
    </form>
    

    you can use this code, to perform this form.

    NSURL *url = [NSURL URLWithString:@"http://test.com/action.php];
    ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
    [request setPostValue:@"Admin" forKey:@"username"];
    [request setPostValue:@"1234" forKey:@"password"];
    [request startSynchronous];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie to python and the app engine. I have this code that
I have this code that performs an ajax call and loads the results into
I have this code in a C application that's embedding Python (2.7.1): { PyObject
I have this code in jQuery, that I want to reimplement with the prototype
I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have some python code that does a certain task. I need to call
I have a some python code that prints log messages. When run at the
I'm using this code in Python: for ... : cursor.execute('INSERT OR IGNORE INTO foo
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.