I'm trying to parse data from the server, but I get this error: The parameters should be passed as an array of objects, as well as the response obj ...
I'm trying to parse data from the server, but I get this error: The parameters should be passed as an array of objects, as well as the response obj ...
My code sends HttpConnection and then tries to use either connection.getInputStream() or connection.getErrorStream() to deserialize response. How c ...
I am making an iOS app, and I have this problem. My app most be only in Spanish, so i changed the development language (in the hard way, changing ...
I am trying to access the custom server response body for 500 errors in class HTTPURLResponse (URLResponse) using URLSession.shared.dataTask function. ...
I am working on a login application, After successful login response comes back with 2 cookies, i want to get this 2 cookies from the header of my HTT ...
I have the following method which I used for retrieving a cookie from response headers: internal static func cookie(from response: HTTPURLResponse) - ...
I have been trying to unit test HTTP response headers. I need to receive a cookie from the headers. I get two Set-Cookie headers back, but I need one ...
Converting to Swift 3 I noticed a strange bug occur reading a header field from HTTPURLResponse. no longer worked. I printed out the all headers d ...
I'm using blocks to get header fields from response in one class and I have to get that in another class. I implemented code like this In first cla ...
From NSHTTPURLResponse documentation, I did not find a way to get the HTTP version (i.e. "HTTP/1.1" or "HTTP/1.0"). HTTP header fields are available ...
May be this is a dumb question, but I want to store cookies for same url but different for usernames. How can this be achieved using NSHTTPCookieStora ...
My application uses custom NSURLProtocol subclass. I need to substitute NSHTTPURLResponse with my copy, modifying some of the headers fields. So, I cr ...
I have this code : At the line : let httpResponse = response as! NSHTTPURLResponse I have this strange warning : Cast from 'NSData' to unrelated t ...
I try to get the filesize of a file stored on a server. I manage to do, but it takes as long as I would download it. I assume it will download the ...
I have successfully completed a POST request to server and I am trying to parse the response JSON but I have been unsuccessful. I am using SwiftyJS ...
When making a call to an API, I receive this as response: print(HTTPResponse.allHeaderFiles) prints the following output: But I can't get cookie ...
I'm using NSURLSession to request a JSON resource from an HTTP server. The server uses Cache-Control to limit the time the resource is cached on clien ...
I have an interesting problem: when my device is in Airplane Mode, the HTTP Status Code that the NSHHTPURLResponse provides is 200 "OK". Shouldn't it ...
I'm using code that I got from a tutorial for finding the "Date Modified" info of a file on a server. It goes as follows... And, for the most part, ...
I would like to convert my response from the NSHTTPURLResponse type to String: The line below outputs the response message to the console. But t ...