Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9054

[fiware-stackoverflow] HTTP Request returning empty element

    Details

      Description

      Created question in FIWARE Q/A platform on 16-02-2016 at 12:02
      Please, ANSWER this question AT https://stackoverflow.com/questions/35431734/http-request-returning-empty-element

      Question:
      HTTP Request returning empty element

      Description:
      I try to get a JSON object from a webservice with

      MashupPlatform.http.makeRequest(url, {
      method: 'GET',
      requestHeaders:

      {"Accept": "application/json"}

      ,
      forceProxy: true,
      onSuccess: function (response)

      { console.log("response: " + JSON.stringify(response)); success(response); }

      ,
      onFailure: function (response)

      { error(response); }

      ,
      onComplete: function ()

      { complete(); }

      });

      but in the console every time an empty element ({}) gets logged. If I use curl to request that exact same URL I get the response I need. Is the wirecloud proxy unable to request application/json? In my browsers network analysis I see the request including the correct response, but the success function seems to not get that data.

        Activity

        backlogmanager Backlog Manager created issue -
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:16|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:16|CREATED monitor | # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:11|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:11|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:11|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:11|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        fla Fernando Lopez made changes -
        HD-Enabler Wirecloud [ 10857 ]
        Description
        Created question in FIWARE Q/A platform on 16-02-2016 at 12:02
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/35431734/http-request-returning-empty-element


        +Question:+
        HTTP Request returning empty element

        +Description:+
        I try to get a JSON object from a webservice with

        MashupPlatform.http.makeRequest(url, {
                    method: 'GET',
                    requestHeaders: {"Accept": "application/json"},
                    forceProxy: true,
                    onSuccess: function (response) {
                        console.log("response: " + JSON.stringify(response));
                        success(response);
                    },
                    onFailure: function (response) {
                        error(response);
                    },
                    onComplete: function () {
                        complete();
                    }
                });


        but in the console every time an empty element ({}) gets logged. If I use curl to request that exact same URL I get the response I need. Is the wirecloud proxy unable to request application/json? In my browsers network analysis I see the request including the correct response, but the success function seems to not get that data.
        Created question in FIWARE Q/A platform on 16-02-2016 at 12:02
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/35431734/http-request-returning-empty-element


        +Question:+
        HTTP Request returning empty element

        +Description:+
        I try to get a JSON object from a webservice with

        MashupPlatform.http.makeRequest(url, {
                    method: 'GET',
                    requestHeaders: {"Accept": "application/json"},
                    forceProxy: true,
                    onSuccess: function (response) {
                        console.log("response: " + JSON.stringify(response));
                        success(response);
                    },
                    onFailure: function (response) {
                        error(response);
                    },
                    onComplete: function () {
                        complete();
                    }
                });


        but in the console every time an empty element ({}) gets logged. If I use curl to request that exact same URL I get the response I need. Is the wirecloud proxy unable to request application/json? In my browsers network analysis I see the request including the correct response, but the success function seems to not get that data.
        fla Fernando Lopez made changes -
        Assignee Backlog Manager [ backlogmanager ]
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 54m 1 Backlog Manager 22/May/17 6:10 PM
        In Progress In Progress Closed Closed
        3h 1 Backlog Manager 22/May/17 9:10 PM

          People

          • Assignee:
            backlogmanager Backlog Manager
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: