Questions tagged [urlrequest]

247 questions
1
vote
2 answers

AlamofireImage: How to downdload images with POST request

AlamofireImage seems to be supposed to request with GET method in general. But in our project, to download images we have to request with POST method, because we send access token. I have searched for the similar question in Stack Overflow, but I…
Kazunori Takaishi
  • 2,268
  • 1
  • 15
  • 27
1
vote
1 answer

Failing to Upload Picture with multipart/form-data to a Server

I've read quite a lot of topics here on multipart/form-data. It still doesn't work. I am able to upload a file to my server with URLSession.shared.uploadTask. class MainViewController: UIViewController { @IBOutlet weak var pictureView:…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
1
vote
1 answer

Swift: URLRequest not clearing cache

I have a simple PHP service file set up with this code:
PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
1
vote
0 answers

Where can i find documentation on URLRequest default header?

From the Internet I read that URLRequest sends an "Accept-Encoding" header by default. I also read that URLSession auto decompresses any data that’s returned compressed. However this information is what an internet post says. I want to read this…
RyanTCB
  • 7,400
  • 5
  • 42
  • 62
1
vote
2 answers

Swift 2.3 to Swift 3.1 Migration - Alamofire request error

I am converting an existing project that used Swift 2.3 to Swift 3.1. So far, I am successful in implementing all changes as per Xcode suggestions, and also added latest PODs. Everything seems to be fine except the following - (Since this is an…
Lohith Korupolu
  • 1,066
  • 1
  • 18
  • 52
1
vote
0 answers

URLRequest in AS3 can't read the correct content when server return 403

I'm using URLRequest in a Flash client to get some information from a service, the service will check the parameter in the request url, if the parameter is invalid, the server may return 403 with some content in http body, and I need analyse the…
1
vote
1 answer

How to cache image with as3?

This is my first post here in StackOverFlow, and I bring you a problem that is hauting my development team. We are in a project, using stand alone FlashPlayer as a news displayer. The news feed is a dynamic XML returned from a ASP.Net request and…
1
vote
1 answer

How to load an image using openfl building for html5?

Hello i'm using this code: var url:URLRequest = new URLRequest( "https://www.google.com.br/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png" ); var ldr = new Loader(); ldr.load( url ); addChild( ldr ); to load an image and add to screen.…
Thiago Sabin
  • 137
  • 1
  • 12
1
vote
0 answers

Socket not working with URLRequest on my PC

This is my code: var teste:SpriteOnline = new SpriteOnline(170, 90); teste.load("http://www.marciofaustino.com/uploads/1/6/4/6/16464874/143987431_3_orig.jpg"); this.addChild(teste); //Cria a instancia do jogador new Player(); //Inicialização dos…
Thiago Sabin
  • 137
  • 1
  • 12
1
vote
1 answer

Send POST request with custom headers using flash

I am trying to send POST request with custom headers using flash, but I can only get it to send the request as GET even when I use request.method = URLRequestMethod.POST; Here is my code: package { import flash.display.Sprite; import…
user00239123
  • 270
  • 4
  • 16
1
vote
2 answers

Swift 3 - URLRequest creation crashes

let url = URL(string: "\(SERVER_HOST)/post?fb_id=\(fb_user)") var request = URLRequest(url: url!) // Crashes here Alamofire.request(request) .responseJSON { response in switch response.result { …
Etgar
  • 5,774
  • 2
  • 16
  • 30
1
vote
0 answers

AS3 new URLRequest results in 404 despite file being there

I have a flash preloader in the same folder as the swf file it's supposed to load, located on the webhost server. Within Flash, the preloader loads the swf without problem, but online it can't find the file/it won't load (404 seen under developer…
slackexchange
  • 55
  • 1
  • 9
1
vote
2 answers

Encode parameters for URL Request

I created a Router to generate URL Requests. enum Router: URLRequestConvertible { static let baseURLString = "SERVERIP" case GetAEDInRange(String) // match URLRequest routes to Alamofire methods var URLRequest: NSMutableURLRequest…
sesc360
  • 3,155
  • 10
  • 44
  • 86
1
vote
0 answers

NSURLsession not working in loop

Im trying to make request to multiple URLs to download the HTML and later turn it into a JSON format. Where I'm running into trouble is when i try to make request to multiple URLs in the for loop. I'm no master on this with async requests so, this…
niwim
  • 21
  • 7
1
vote
1 answer

URLVariables not working in Haxe project

how are you doing? I hope fine. So I'm trying to send an urlRequest and I can't pass the parameters by url so I'm trying to use the URLVariable, but no matter what I try my php always get null. var request:URLRequest = new…
user3120770
  • 199
  • 1
  • 7
  • 19