1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Http Get

Discussion in 'iPhone/iPad Programming' started by Kareny, Jul 12, 2010.

  1. macrumors newbie

    Hey guys,
    I have a problem about HTTP GET in objective-C.
    I added two parameters followed by a website, and then upload to a web service.
    For example:
    NSURL *url = [NSURL URLWithString:mad:"http://www.mywebsite/Upload?parameter1=value1 & parameter2=value2"];

    and the code works fine, I can get parameter1 and parameter2 on my web service.

    My questions is how can I change the parameter to a Textfield.text?

    Thanks very much!!!
  2. Moderator


    Staff Member

    You sure the URL doesn't look something more like @"http://www.mywebsite/Upload?parameter1=value1& parameter2=value2" ? That's how a normal URL includes parameter values.

    You should look into how to format a string to include an argument list. I'd start by looking at the String Programming Guide.
  3. macrumors newbie

  4. macrumors newbie

    Thanks a lot!! I got the solution and the problem is solved:D

Share This Page