Skip to content

Instantly share code, notes, and snippets.

Last active March 10, 2019 05:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Arjun-sna/5ef325627eeb4bd510a75aff4d598c33 to your computer and use it in GitHub Desktop.
import Config from 'react-native-config';
import axios from 'axios';
const response = await axios(GITHUB_OAUTH_ENDPOINT, {
method: METHOD.POST,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
data: JSON.stringify({
client_id: Config.CLIENT_ID, // Access CLIENT_ID env varaible using `Config`
client_secret: Config.CLIENT_SECRET, // Access CLIENT_SECRET env varaible using `Config`
Copy link

Js API call

Copy link


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment