Results 1 to 3 of 3

Thread: Switching from HTTP to HTTPS fails in Connection.js

  1. #1
    Sencha User firekesti's Avatar
    Join Date
    Sep 2012
    Posts
    22
    Answers
    2

    Default Switching from HTTP to HTTPS fails in Connection.js

    I'm overriding the Rest Proxy's buildUrl method like this:
    Code:
    request.setUrl("http://" + serverUrl + ":8080/restapi/2.0" + url);
    This worked perfectly, but I needed to add support for SSL, so I changed it to this:
    Code:
    request.setUrl("https://" + serverUrl + "/restapi/2.0" + url);
    Performing this request outside of Sencha works great, but when I try to load it in my app (using Chromium with --disable-web-security), I get a strange error:
    "GET https://10.0.87.97/restapi/2.0/entry-type Connection.js:314"
    There's no sign of a response code, it's just failing at that line. I looked it up,
    Code:
                // start the request!
                xhr.send(requestOptions.data);
    When I debugged through that line it looked like requestOptions.data was null. Why would this be happening?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448
    Answers
    3997

    Default

    The data comes from the rawData, xmlData or jsonData in the request config you send. If it's not a GET, the data will also come from any params you specified in the request config so it may be null and should be valid.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    12
    Answers
    1

    Default Similar error

    I am getting a similar error with Connection.js at line 314 ('Resource failed to load') , while sending requests over HTTPS.
    How to overcome it?

    Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •