Halnry
Halnry

Reputation: 418

Can I send an NSURLRequest over a socket?

I would like to take an NSURLRequest and turn it into some usable data that is ready to be written to a socket() instead of something like an NSURLConnection.

What is the best way to accomplish this?

Upvotes: 1

Views: 548

Answers (1)

Anoop Vaidya
Anoop Vaidya

Reputation: 46543

NO!

You can create a NSMutableURLRequest and provide that request with a HTTPBodyStream then create a NSURLConnection to send the request.

The HTTPBodyStream is an NSInputStream the request will read the body from. You can get it value from user, file or NSData.

Upvotes: 1

Related Questions