0 Replies Latest reply: Nov 5, 2017 10:35 PM by micro win RSS

    Get data from JSON with Headers

    micro win

      Hello,

       

      I need to GET data from a JSON by using a URL that I've been given, and I was told that I need to send a header with the following data:

       

      URL: https://example.services.com

       

      **Authorization**: Token (Something like: dXw1gh4p2K/w==)

      **Content-Type**: *GET - application/json* - *POST - application/x-www-form-urlencoded*

      **X-Requested-With**: *XMLHttpRequest*

       

      They told me that the token is a key that must be sent with the header on each GET/POST communication. Then, they sent me the following:

       

      Service: Get Customer List

       

      GET /api/customers.json

      It brings a JSON with the customers

      Example: /api/customers.json

      Authorization: dXw1gh4p2K/w==

      Content-Type: application/json

      X-Requested-With: XMLHttpRequest

       

      I've tried making a request with the website hurl.it but it didn't work: https://i.stack.imgur.com/62nUu.png

       

      Am I missing something? I'm using the REST connector and using that data as in the website.

       

      Thanks!