Setting up for Twitter client
This commit is contained in:
parent
df88e7261e
commit
9989d0a5ba
3 changed files with 38 additions and 5 deletions
|
@ -14,6 +14,37 @@ function* workerSaga() {
|
|||
}
|
||||
|
||||
function getData() {
|
||||
// const token = 'token'
|
||||
|
||||
// let myHeaders = new Headers({
|
||||
// 'Content-Type': 'text/plain',
|
||||
// 'Content-Length': content.length.toString(),
|
||||
// 'X-Custom-Header': 'ProcessThisImmediately',
|
||||
// Authorization: `OAuth ${token}`
|
||||
// })
|
||||
|
||||
// let heads = {
|
||||
// authorization: 'OAuth oauth_consumer_key="consumer-key-for-app"',
|
||||
// oauth_nonce="generated-nonce",
|
||||
// oauth_signature="generated-signature",
|
||||
// oauth_signature_method="HMAC-SHA1",
|
||||
// oauth_timestamp="generated-timestamp",
|
||||
// oauth_token="access-token-for-authed-user",
|
||||
// oauth_version="1.0"
|
||||
// }
|
||||
|
||||
// let config = {
|
||||
// method: 'GET',
|
||||
// headers: myHeaders,
|
||||
// }
|
||||
|
||||
// let url = 'https://api.twitter.com/1.1/search/tweets.json?q=from%3Atwitterdev&result_type=mixed&count=2'
|
||||
|
||||
// return fetch(url, config).then(response => {
|
||||
// console.log(response)
|
||||
// response.json()
|
||||
// })
|
||||
|
||||
return fetch("https://jsonplaceholder.typicode.com/posts").then(response =>
|
||||
response.json()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue