0

I am developing backend proxy server which use RESTful API for request and response. However, the documentation is not friendly for me, I don't know how to get data from below "Request Sample" in node.js. How can I get data?

POST /action_name HTTP/1.1
Accept: application/json, */*
Content-Length: 400
Content-Type: application/json
Host: builder.open.co.kr
Authorization: token TOKEN_STRING


{
    "version": "2.0",
    "action": {
        "actionName": "{{string}}",
        "parameters": {
            KEY: {
                "type": "{{string}}",
                "value": VALUE
            }
        }
    }
    "context": {
        "accessToken": "{{string}}",
        "device": {
            "type": "{{string}}",
            "state": {
                KEY: VALUE
            }
        },
        "supportedInterfaces": {
            "AudioPlayer": {
                "playerActivity": "PLAYING",
                "token": "string value",
                "offsetInMilliseconds": 100000
            }  
        },
        "privatePlay" : { } // reserved
    }
}

Thank you.

Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
HyeonggeunYun
  • 21
  • 1
  • 3
  • 3
    And what did you tried already? Where is your javascript code? Your server? – Tarabass Nov 16 '18 at 21:32
  • Because I don't know how to get above data and meanings, I could not do anything – HyeonggeunYun Nov 16 '18 at 21:36
  • Check if this help https://stackoverflow.com/questions/5643321/how-to-make-remote-rest-call-inside-node-js-any-curl – Azhar Nov 16 '18 at 21:43
  • You say you are developing a proxy server. You are talking about documentation. What did you tried? Or do you want us to develop a proxy server (if you know what that is) for you? Maybe you should buy a book about nodejs. There are quiet a few good ones out there. – Tarabass Nov 16 '18 at 21:53
  • I didn't know how to get rest api request from others, now I understand some mechanism because of your comments. Thank you! – HyeonggeunYun Nov 17 '18 at 03:02

0 Answers0