Questions tagged [urlrequest]

247 questions
0
votes
1 answer

Alamofire fail request because certificate but work on Postman

I am having an issue with one request that I am doing. Using the Postman this request works with one warning "Self signed certificate in certificate chain" Here is the curl if you want try out: curl --location --request GET…
Tiago Mendes
  • 4,572
  • 1
  • 29
  • 35
0
votes
1 answer

kivy Urlrequest with callback throws error on mobile, but not on laptop, why?

The below is the COMPLETE code. The output when I run this below simple kivy code on my laptop is "Hello from Kivy Success". While the output when I run using buildozer android debug deploy run from ubuntu to my mobile is "Hello from Kivy Error". I…
Preeti
  • 3
  • 7
0
votes
1 answer

Swift5 parsing JSON in the response header(binary)

I'm supposed to parse a data inside the header(wtf) instead of the body. The response header format looks like this { "InferResponse": { "modelName": "aixyolov2", "modelVersion": "1", "batchSize": 1, …
0
votes
1 answer

kivy.network.urlrequest not working on Android, causes black screen

Till I added the below lines for Urlrequest, my kivy app worked on my android and opened instantly with the right output . Now after adding the urlrequest code, I have a never ending black screen on my android. Why is this happening? My laptop…
Preeti
  • 3
  • 7
0
votes
1 answer

URLRequestDefaults.setLoginCredentialsForHost not setting the user & pwd in authorization header

I want to access html files which are protected by basic authentication. I am trying to load this html page using htmlloader and sending the request by urlRequest. I am using URLRequestDefaults class to set the credentials but when I see the request…
Mady
  • 5,016
  • 7
  • 35
  • 46
0
votes
1 answer

Recode Flex URLRequest and navigateToURL form emulation to Royale JS

I have a bunch of Flex pages I need to convert to get rid of the flash player and have been unable to see how to replicate this code just using the javascript. The Flex code gathers up data and sends it in a POST to a Cold Fusion page in another…
wrkoch
  • 29
  • 4
0
votes
0 answers

Is there any way to open Safari browser from inside an iOS app with complete URL Request in Swift?

I have created a whole URL request, and I load it in the web view I am using. In that process, there comes a web page, where on click of a link, a pdf has to be downloaded. Since, no URL is associated with that file, I am not able to download…
Anuranjan Bose
  • 201
  • 1
  • 3
  • 16
0
votes
1 answer

wget.download() only works for some links

I have a list of some links (which are pdf files). I'm running wget.download() for each link in the list. However, only some of them get downloaded and then I get: File "/home/.local/lib/python3.6/site-packages/wget.py", line 526, in download …
user13067694
0
votes
3 answers

MVC 2 how to go to url without redirecting?

Is there a way to go to a url without redirecting to it? Basically I want to call a url from within my application in the background so it can logout a reliant party. Appreciate the help.
doogdeb
  • 403
  • 1
  • 4
  • 15
0
votes
3 answers

How can I use Alamofire Router to organize the API call? [swift/ Alamofire5]

I'm trying to convert my AF request to Router structures for a cleaner project. I'm getting an error for: Value of protocol type 'Any' cannot conform to 'Encodable'; only struct/enum/class types can conform to protocols. Please help me to fix the…
14079_Z
  • 401
  • 5
  • 20
0
votes
2 answers

How do a make a API request in Swift like the working Python request I'm currently using?

I'm looking to convert this Python request to a Swift script. Here is my working python script that returns the accessToken! #!/usr/bin/python import requests import json #MAKE THE REQUEST URL = "http://this/is/the/url" headers = { 'Accept':…
Mdoyle1
  • 121
  • 1
  • 12
0
votes
1 answer

Handling leaked OAuth Token in headers - iOS WKWebView

I'm loading an URLRequest on a WKWebView with a custom header which contains our OAuth Token. The request would be redirected to a third party URL, with the OAuth Token from our end. Should we consider this as a leaked header?
DesperateLearner
  • 1,115
  • 3
  • 19
  • 45
0
votes
1 answer

RXSwift: Modifying URLRequest if request fails in `retryWhen`

I need to modify the headers of the request when the request fails but the request doesn't change when I modify the request in retryWhen Here is my implementation: func makeRequest(serviceRequest: URLRequest) { let maxRetry = 2 var…
user2924482
  • 8,380
  • 23
  • 89
  • 173
0
votes
1 answer

How to pass an argument (args) to a `request.get`?

I'm trying to find out how to pass an argument (args) to a request.get. I know how to pass a token to the HTTP header like this: request.httpMethod = "GET" request.setValue(token, forHTTPHeaderField: "token") But if I was going to pass the email as…
Houman
  • 64,245
  • 87
  • 278
  • 460
0
votes
1 answer

iOS:URLRequest Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid

I'm trying to implement an request: func makeRequest(urlStr: String) { let session = URLSession.shared let url = URL(string: urlStr)! let task = session.dataTask(with: url, completionHandler: { data, response, error in if error…
user2924482
  • 8,380
  • 23
  • 89
  • 173