Questions tagged [nsmutableurlrequest]

NSMutableURLRequest is a subclass of NSURLRequest provided to aid developers who may find it more convenient to mutate a single request object for a series of URL load requests instead of creating an immutable NSURLRequest for each load.

Information : NSMutableURLRequest Class Reference

370 questions
0
votes
1 answer

How to send an OPTIONS HTTP Method in iOS?

I am working for a company that has an HTTP OPTIONS method as one of their routes. How do I send an HTTP OPTIONS method in iOS, either using NSMutableURLRequest, AFNetworking, or some other library? Is it possible?
Jayant Sani
  • 183
  • 2
  • 12
0
votes
1 answer

How to POST NSMutableURLRequest alogn with custome header fields using Alamofire

I'm trying POST NSMutableURLRequest request through Alamofire, but not able to set these filed value in HTTP header. Any help ? var params = ["username":"veeru@gamil.com", "password":"Pasword123!", "csrfmiddlewaretoken":csrfToken] as…
Veeru
  • 31
  • 1
  • 5
0
votes
1 answer

Uploading UIImage to server using UIImageJPEGRepresentation

I'm writing an app which uploads a UIImage to my server. This works perfect, as I see the pictures being added. I use the UIImageJPEGRepresentation for the image data and configure an NSMutableRequest. ( setting url, http method, boundary, content…
0
votes
1 answer

What's wrong when i transfer the java code to iOS code about connecting to the server and get result?

The java code is below,It's about to connect to the server and get some information, you can run the java code and get…
leizh007
  • 71
  • 1
  • 7
0
votes
0 answers

How do I Upload an Image to a Server through HTTP POST Request using FILES variable?

I am currently building an app in Xcode using Objective C and I need to post two text variables and an image. As of right now, I can only post the two text variables but I would like to send an image from my UIImageView to the server by using the…
0
votes
1 answer

How to encode xml data

In my app i have to send a xml data as request, I am creating the xml string like this NSString* str = @""; str = [str stringByAppendingFormat:string1]; str = [str stringByAppendingFormat:@""]; str = [str…
kiri
  • 1,977
  • 5
  • 27
  • 55
0
votes
1 answer

How to correctly include .ASPXAUTH and ASP.NET_SessionId cookies with NSMutableURLRequest

I've been at this problem for a few days. My app needs to login to an ASP.NET (version: 4.0.30319, MVC version: 3.0) server and then post via a NSMutableURLRequest to a restricted page (a page that requires you to be logged in to access). Currently…
alicooke
  • 108
  • 1
  • 1
  • 6
0
votes
1 answer

How to use NSMutableRequest in XCode6

Code: var request = NSMutableURLRequest(URL: strURl, cachePolicy:NSURLRequestCachePolicy, timeoutInterval:60.0) What is wrong with my code? How do I solve below error: Expected member name or constructor call after type name any help will be…
user3823935
  • 891
  • 2
  • 16
  • 26
0
votes
0 answers

NSMutableURLRequest returning JSON with empty sub-arrays

I have created a method that uses NSMutableURLRequest to request and receive JSON from a RESTful API running on a remote machine. The request successfully returns some JSON, but the returned sub-arrays in the JSON (see tasks: []) are empty. The JSON…
hombero
  • 11
  • 4
0
votes
2 answers

How to add request Parameters in NSMutableRequest

I Have created a mutable request . NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [request…
Madhan Mani
  • 90
  • 2
  • 8
0
votes
2 answers

Async image download with header Objective-C

I'm trying to download an image asynchronously with this library https://github.com/rs/SDWebImage#using-asynchronous-image-caching-independently -(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView…
0
votes
3 answers

NSMutableURLRequest truncating my URL

My NSMutableURLRequest is truncating my URL when sending the request. Any thoughts why? For Example: url =…
erad
  • 1,766
  • 2
  • 17
  • 26
0
votes
1 answer

Using url request with swedish letters

I'm trying to use an API service to fetch xml data. The problem arise when I try to append a string to the url with swedish åäö in it. If I just add the swedish letters the connection fails, and when I add UTF8 encoding the reply is empty data which…
user2908112
  • 457
  • 6
  • 18
0
votes
1 answer

How to send HTTP POST request to PHP service with Objective-C

Im trying to post to php and get the response. The php file has an echo "hello" which should just print hello. I'm trying to test to see if posting is working but in my error log the NSlog doesn't display anything: @interface ViewController…
0
votes
1 answer

ASIHTTPRequest setDomain -> NSURLRequest equivalent?

I'm attempting to transition some old code for SOAP requests that relied heavily on the ASIHTTPRequest library, to instead use the standard NSMutableURLRequest instead. However, I'm running an issue: while with ASIHTTPRequest I had access to a…