授权码为:1BHxWt
var settings = { "async": true, "crossDomain": true, "url": "http://localhost:8080/oauth/token?grant_type=authorization_code&code=1BHxWt&client_id=client1&client_secret=123456&redirect_uri=http://baidu.com&scope=test", "method": "POST", "headers": { "User-Agent": "PostmanRuntime/7.15.2", "Accept": "/", "Cache-Control": "no-cache", "Postman-Token": "13e40b5d-2e86-43c4-965e-da210e011906,d4c4f88b-ac15-45d9-862a-65dbcf839c6a", "Host": "localhost:8080", "Cookie": "merchant.session.id=6b82e720-8198-4f19-9b56-5faf2d00a389; JSESSIONID=9D4447918C453A0CB47E1393696D6342", "Accept-Encoding": "gzip, deflate", "Content-Length": "", "Connection": "keep-alive", "cache-control": "no-cache" } }
$.ajax(settings).done(function (response) { console.log(response); });
携带access_token参数请求资源