Javascript 具有React-Native的OAuth2请求

Javascript 具有React-Native的OAuth2请求,javascript,oauth-2.0,react-native,Javascript,Oauth 2.0,React Native,我正在为我的移动应用程序使用YelpAPI。YelpAPI需要OAuth2请求(使用者密钥、秘密密钥、令牌、秘密令牌)。如何使用react native发出请求?您可以使用fetch api发出网络请求, 提及 请参阅文档 fetch(apiUrl, options) .then(function(response) { return response.json() }).then(function(json) { console.log('parsed json',

我正在为我的移动应用程序使用YelpAPI。YelpAPI需要OAuth2请求(使用者密钥、秘密密钥、令牌、秘密令牌)。如何使用react native发出请求?

您可以使用fetch api发出网络请求, 提及

请参阅文档

  fetch(apiUrl, options)
  .then(function(response) {
    return response.json()
  }).then(function(json) {
    console.log('parsed json', json)
  }).catch(function(ex) {
    console.log('parsing failed', ex)
  })

这只是一个简单的获取请求,oauth部分在哪里?