Questions tagged [urlrequest]

247 questions
0
votes
1 answer

iOS missing POST data in URLRequest at least prior to 10.3

A web view with POST data does not POST the body, so I'm missing required parameters of the web view. It works fine in later versions, but does not work with 9.1. Here is how I'm setting up my webview: lazy var webView:WKWebView = { let view =…
Jake T.
  • 4,308
  • 2
  • 20
  • 48
0
votes
1 answer

urlrequest not sending post request

Hi i am new to IOS App developement. My code is func sendRequest(api: String, parameters: [String: String]? = nil, outputBlock: @escaping (T) -> () ) { guard let url = URL(string: "http://xxyyzz.com/appRegister.php") else…
Gopal krishan
  • 179
  • 2
  • 4
0
votes
1 answer

URL requests with bad URLs Python

I recently started writing Python for a project I am working on. I wrote a script that takes a list of URLs of images (like in a txt file) and downloads them all. However, some of the URLs on the list are old and do not work any more. This causes an…
user9245495
0
votes
2 answers

calling a web service with httpMethod (POST) in swift 4.1

Let me describe view controller (page design) first. I have added one button and one label. And a function is created by me for the button. Here is the ViewController.swift file: import UIKit class ViewController: UIViewController { @IBOutlet…
mannyCalavera
  • 593
  • 1
  • 4
  • 23
0
votes
0 answers

One video not playing on WKWebView

In a small iOS app showing a website I use this code: var webView:WKWebView! ...... let theURL = URL(string: "https://www.example.moon"), theRequest = URLRequest(url: theURL!), webView = WKWebView(frame: myWebFrame) …
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
1 answer

How to set a cookie to be used in all the calls in WKWebView

I am loading a WKWebview and setting up a cookie. The server is receiving it correctly. The web page that is loaded is making more calls to the server to load other resources: css, js, etc. How to make sure the cookie I set in the first call is…
dragos
  • 300
  • 1
  • 4
  • 12
0
votes
1 answer

Trying to select a files location + file name in AS3

I am creating a file testing program in actionscript 3. I have the URL loader to load the file path + name typed in the textbox. However I am looking to upgrade the experience. I am trying to find a way to choose a file location and name from a…
Chibizs
  • 11
  • 2
0
votes
2 answers

How handle async URLRequest finished?

I try to create request in func and after call the func and return responсe json. But because request is async response arrived after func returns any data. How handle request finishing?
Golovanov Dmytrii
  • 527
  • 1
  • 6
  • 20
0
votes
1 answer

Cells overlapping in UICollectionView

I am displaying the results of a web request to a custom API in an UICollectionView with dynamically sized cells. However, when I call reloadSections after having fetched the data, many of the cells display overlapping. As the view is scrolled,…
0
votes
1 answer

Executing a POST request within a loop Swift 4

I'd like to make multiple POST requests to a web server that I have got which inserts a new record in a table in my database. This will be repeated depending on the amount of exercises the user inputs. I have a function for the POST request which is…
Luke Varty
  • 61
  • 7
0
votes
0 answers

POST URLRequest doesn't work in Swift 4

I want to use HTTP request to post an image on Imgur. I used Postman first to make sure my API logic is correct. Here is my setting for Postman (myid is client id): This request succeeded, but the request failed in Swift with URLRequest and…
Jay Wang
  • 2,650
  • 4
  • 25
  • 51
0
votes
0 answers

URLRequest fewer characters

I'm trying to fetch some weather data (Location forecast). This request return a couple of kb. OK, so I would only like to request the first part or terminate the request when i get the line Is it…
Friesgaard
  • 2,975
  • 2
  • 17
  • 13
0
votes
1 answer

timing issue after completion of URLRequest

i have a behavior i cant resolve. I have a controller (controller 1) where i check some defaults value. if not present (first time use of app: check login and pwd) i present (modal) a settings vc: IN CONTROLLER 1 override func viewDidAppear(_…
pm200107
  • 303
  • 1
  • 11
0
votes
1 answer

Returning an array of string and populate UILabel - Swift 3

There are two requests being made. The first request returns an array of int. The objects in the array of int are unique. Meaning, it has a string value associated with an int. To get the value for the key, I have to make a second request. The…
Dev-A-iOS
  • 5
  • 5
0
votes
2 answers

How to Extend URLRequest

The result of trying to write maintainable, clean code: func fetchNumbersFromServer(completion: @escaping (NumbersResult) -> Void) { let urlString = "https://some-site.com/some-file" var request = URLRequest(url: URL.init(string:…
David
  • 3,285
  • 1
  • 37
  • 54