Questions tagged [urlrequest]
247 questions
128
votes
6 answers
What is the most robust way to force a UIView to redraw?
I have a UITableView with a list of items. Selecting an item pushes a viewController that then proceeds to do the following. from method viewDidLoad I fire off a URLRequest for data that is required by on of my subviews - a UIView subclass with…

dugla
- 12,774
- 26
- 88
- 136
10
votes
9 answers
Flex 3 - how to support HTTP Authentication URLRequest?
I have a Flex file upload script that uses URLRequest to upload files to a server. I want to add support for http authentication (password protected directories on the server), but I don't know how to implement this - I assume I need to extend the…

BrynJ
- 8,322
- 14
- 65
- 89
10
votes
3 answers
Swift URL Session and URL Request not working
I am getting very similar problems to this post, but I don't fully understand the answer. I've created a completion handler, but it doesn't seem to be working as expected.
func updateTeam(teamID: Int) {
startConnection {NSArray, Int in
…

D. Cohen
- 567
- 1
- 7
- 22
8
votes
1 answer
iOS Yelp OAuth Token Retrieval with URLRequest returning "client_id or client_secret parameters not found
I am attempting to retrieve an OAuth token to use Yelp's Fusion API from an iOS client using the native URL and URLRequest classes, but it is giving me this error in the "tokenInfo" variable:
client_id or client_secret parameters not found. Make…

dhruvm
- 2,672
- 2
- 19
- 24
8
votes
1 answer
URLSession dataTask timeout error
I am currently experiencing some issues regarding the URLSession, while trying to post data to my web server. This however, works perfectly. What seems to not work, is the timeout I have set. This is rather crucial for my whole app, as I don't want…

askaale
- 1,199
- 1
- 23
- 50
7
votes
2 answers
URLRequest equality doesn't include httpBody
Overview
There are 2 URLRequests, one with httpBody and one with no httpBody.
However when compared, it shows both are equal.
Question
Is this expected behaviour or am I missing something ?
Code
let url = URL(string: "www.somevalidURL.com")!
var r1…

user1046037
- 16,755
- 12
- 92
- 138
7
votes
0 answers
URLSession on Linux giving different result than on iOS
I've got a simple class making a HTTP POST request (to a Neo4j server, but that shouldn't matter) using URLSession, and an integration test that tests that it succeeds.
Through Xcode, via the iOS simulator, I can run this test a million times - it…

niklassaers
- 8,480
- 20
- 99
- 146
6
votes
1 answer
Swift - Convert URLRequest to cURL
How to convert URL Request to cURL?
I know there are plugins available in Alamofire / Moya.
But I'm using native code.
Here is how I'm generating URLRequest.
var urlRequest = URLRequest(url: url) // URL is a param herel
var newHeaders: [String:…

sagarkothari
- 24,520
- 50
- 165
- 235
6
votes
1 answer
How do I fix this cross-domain ActionScript 3 error?
I'm going to be as specific and verbose as possible and include some of the code I'm using. I already did a search and found this question, which seems similar; however the author there was using ActionScript 2 instead of 3, and I couldn't seem to…

soapergem
- 9,263
- 18
- 96
- 152
6
votes
3 answers
Unexpected Flash Security Exception When Using URLLoader
What I am trying to accomplish is to upload some binary data, specifically a ByteArray representing a PNG image, to a server using the URLLoader class in conjunction with URLRequest.
When I set the contentType property of the URLRequest to…

Cameron
- 96,106
- 25
- 196
- 225
5
votes
1 answer
Set Cookies for URL Request
Currently I have an iOS app that pulls prices and data from websites. So far its been working well, but I want to make it more accurate. To do so, I need to set the cookies for the URL request that I'm currently using String(contentsOf: _)…

odonckers
- 243
- 1
- 2
- 11
5
votes
1 answer
Swift 3 - How to handle URLRequest / URLSession errors?
I want to know how you guys handle errors when using a URLRequest in your app. How do you go about notifying your users that an error has occurred? Do you even notify your users at all? Do you try and reload the URLRequest again? Do you tell your…

user3111472
- 207
- 2
- 12
4
votes
3 answers
How do I prevent Flash's URLRequest from escaping the url?
I load some XML from a servlet from my Flex application like this:
_loader = new URLLoader();
_loader.load(new URLRequest(_servletURL+"?do=load&id="+_id));
As you can imagine _servletURL is something like http://foo.bar/path/to/servlet
In some…

Peldi Guilizzoni
- 389
- 4
- 11
4
votes
1 answer
Check If Image URL Leads To Real Image in Python
So I am building a Python script to download images from a list of urls. The script works to an extent. I don't want it to download images that have urls that don't exist. I take care of a few images with some usage of status code but still get bad…
user9245495
4
votes
2 answers
Cloud Functions for Firebase Error: Forbidden
I am trying to send multipart/form-data through URLRequest on my app to Cloud Functions for Firebase. And to test if my cloud function and my app are connected, I created a test function and deployed it:
function test(data, callback) {
…

AlexBains
- 295
- 6
- 14