Http Get

Discussion in 'iOS Programming' started by Kareny, Jul 12, 2010.

  1. macrumors newbie

    Joined:
    Jun 21, 2010
    #1
    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

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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. thread starter macrumors newbie

    Joined:
    Jun 21, 2010
    #3
     
  4. thread starter macrumors newbie

    Joined:
    Jun 21, 2010
    #4
    Thanks a lot!! I got the solution and the problem is solved:D
     

Share This Page