POSTing with JSON using npm request

前端 未结 3 1460
生来不讨喜
生来不讨喜 2021-02-20 11:04

How would one do the following with the request npm module?

curl https://todoist.com/oauth/access_token \\
    -d client_id=0123456789abcdef \\
             


        
3条回答
  •  梦谈多话
    2021-02-20 11:45

    Pretty sure that demo is equivalent to: https://todoist.com/oauth/access_token?client_id=0123456789abcdef&client_secret=secret&code=abcdef&redirect_uri=...

    Where a ? starts the parameters and an & separates them.

提交回复
热议问题