• 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: Problems with NSURLRequest and HTTP POST Form Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with NSURLRequest and HTTP POST Form Data


  • Subject: Re: Problems with NSURLRequest and HTTP POST Form Data
  • From: "Christopher Bland" <email@hidden>
  • Date: Tue, 13 Jun 2006 21:38:26 GMT

I've seen some working code that used this code:

- (void)transmitXMLRequest:(NSData *)data
{
  NSURL *webServiceURL = [NSURL
URLWithString:@"http://test.com/xmlResponder";];
  NSMutableURLRequest *urlRequest = [NSMutableURLRequest
requestWithURL:webServiceURL];
  [urlRequest setHTTPMethod:@"POST"];
  [urlRequest setValue:@"text/xml" forHTTPHeaderField:@"Content-type"];
  [urlRequest setHTTPBody:data];

  NSURLConnection *connectionResponse = [[NSURLConnection alloc]
initWithRequest:urlRequest delegate:self];
  if (!connectionResponse) {
    NSLog(@"Failed to submit request");
  } else {
    NSLog(@"Request submitted");
    responseData = [[NSMutableData alloc] init];
  }
}

Hope that helps you out.

Chris


________________________________________________________________________
Try Juno Platinum for Free! Then, only $9.95/month!
Unlimited Internet Access with 1GB of Email Storage.
Visit http://www.juno.com/value to sign up today!


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Sorting array of NSDictionaries sortedArrayUsingFunction
  • Next by Date: Re: dynamic GUI, how to?
  • Previous by thread: Problems with NSURLRequest and HTTP POST Form Data
  • Next by thread: Re: Problems with NSURLRequest and HTTP POST Form Data
  • Index(es):
    • Date
    • Thread