Questions tagged [urlrequest]

247 questions
0
votes
1 answer

How to pass `null` to httpBody of URLRequest Swift?

How can I set the httpBody for a URLRequest to null? (like the image below taken from Postman). I have verified that the call ONLY works in Postman if the body is actually set to null (raw JSON) as seen in the above. If the body is empty, or set to…
Eric
  • 569
  • 4
  • 21
0
votes
1 answer

Convert Firebase Firestore API POST request from CURL to Swift URLRequest

I have a simple cURL request which inserts data into Firestore database. This works, and no authentication is needed. I need to use cURL as no Firestore library is available for watchOS. curl -X POST -H "Content-Type: application/json" -d…
user7289922
  • 181
  • 1
  • 11
0
votes
1 answer

Swift: Sending Images Object via URLRequest

I have an array of an object that has the following values: var pictures = [Pictures] struct Pictures: Codable, Hashable { var picName1: String var picName2: String var picName3: String var picFile1: UIImage var picFile2: UIImage var…
user20286225
0
votes
1 answer

Actionscript 3, URLRequest/URLLoader problem. Server not receiving data

I am trying to send a server "schooltraq.com/api/" variables for a request. My Code: package { import flash.display.MovieClip; import flash.display.Sprite; import flash.events.*; import flash.net.*; public class tester extends…
akadouri
  • 128
  • 6
0
votes
1 answer

How to make MacOS app url request to text field?

I need to make an app on MacOS with a single button and a single text field, so when I press the button , particular data (mySubstring) from internet will appear in text box. I've tried to do that in Swift Playground , it works fine and here is the…
Narius
  • 39
  • 7
0
votes
1 answer

Post image using UrlRequest in Kivy

How to make post image request using urlrequest in Kivy (Python). How to open a image and send and
c_mike
  • 1
  • 2
0
votes
0 answers

Print failed url request from HTTPError in Python

I'm trying to catch when an error using urlopen occurs by giving both the error code and the url request that fails. I'm able to get the error code by doing: except urllib.request.HTTPError as e: print(e.code) but I can't do the same…
HephMiner
  • 11
  • 2
0
votes
1 answer

Webview, different behavior in simulator compared to device

Good day, I have found an interesting behaviour that I can not understand. I have an app that has a WKWebView. I use locally saved html files to present in the webview. To present each view I have a button for each html file. In the simulator I can…
0
votes
1 answer

HTTP URL request is successful but StringBuilder response returns null

[Java] My HTTP request is using the URL's openStream() method to read and pull the contents of the URL. My servlet is able to access the URL successfully and is also successfully traversing through the content inside the while loop. However, the…
0
votes
1 answer

How many types of URLRequest is possible in iPhone for retrieve the data from WebServices?

In my app i am retrieve data from web services and show in uitableview it is fine but problem is that in mu tableview suppose 10 row (that is city name and latitude longitude of all city that are in my table) after the retrieve city name i m trying…
Muhammad Rizwan
  • 3,470
  • 1
  • 27
  • 35
0
votes
0 answers

Delete XML loader in AS3

I'm developing a tool for Adobe Animate and I ran into some issues with loaders. I load a XML file in this tool and when I press a button, I want it to create a node in my XML file. But nothing happens... I think it's caused by the XML being used…
Mat Gap
  • 1
  • 1
0
votes
0 answers

Getting statusCode other than 200...299 in HTTPURLResponse of URLSession

the following is my APIManager code, I'm using it in all my apps. But sometimes, the guard statement fails in connectToServer function, which means the statusCode of HTTPURLResponse other than 200...299 and the thing here is even after getting…
Harsha
  • 760
  • 1
  • 7
  • 21
0
votes
3 answers

Facebook App using Flash AS3 URLRequest sporatically returns IOErrorEvent s

I've got a Flash-based Facebook App running in an iFrame that makes regular URLRequest .load() calls to the server in order to set and get information about user game play. For most users, this works fine and as intended. The problem is that various…
0
votes
3 answers

Flex: browser popup rather than Alert.show() type popup?

Im trying to create a browser popup window with some text, rather than using the Alert.show() or Flash Player level popups. I have been looking around, and tried some stuff with URI Data Scheme, but thought one of you guys might have done something…
Drenai
  • 11,315
  • 9
  • 48
  • 82
0
votes
1 answer

How can I retry a URLRequest.sharedDataTask until the response is 200?

I am new to Swift and currently stuck on exiting a function containing shared.dataTask once the httpResponse is 200. Any suggestions will be appreciated. func retryFunc(url: String, requestType: String, requestJsonData: Any, retriesLeft: Int) { …
Ozone17
  • 138
  • 7