-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
287 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
{ | ||
"presets": ["latest"] | ||
"presets": [ | ||
"latest", | ||
"stage-0" | ||
], | ||
"plugins": [ | ||
[ | ||
"transform-runtime", | ||
{ | ||
"helpers": false, | ||
"polyfill": false, | ||
"regenerator": true, | ||
"moduleName": "babel-runtime" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Created by Chyroc on 17/1/10. | ||
*/ | ||
|
||
const fetch = require('isomorphic-fetch') | ||
|
||
function sendRequest (method, url, body = null) { | ||
return fetch(url, {method: method, body: body}) | ||
.then(function (res) { | ||
return res.json() | ||
}) | ||
.catch(function (err) { | ||
console.log(err) | ||
}) | ||
} | ||
|
||
export function sendGetRequest (url, body = null) { | ||
return sendRequest('GET', url, body) | ||
} | ||
|
||
export function senPostRequest (url, body) { | ||
return sendRequest('POST', url, body) | ||
} | ||
|
||
export function senPutRequest (url, body) { | ||
return sendRequest('PUT', url, body) | ||
} | ||
|
||
export function senDeleteRequest (url, body = null) { | ||
return sendRequest('DELETE', url, body) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Created by Chyroc on 17/1/10. | ||
*/ | ||
|
||
import { Hasoop } from '../src/index' | ||
|
||
const config = { | ||
'userName': 'Developer', | ||
'host': 'localhost', | ||
'port': 12000, | ||
'webapp': 'sqoop' | ||
} | ||
export const sqoopClient = new Hasoop(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.