import { all, call, takeLatest } from '@redux-saga/core/effects';
import {
    sendRequest
  } from '../../request/sendScrapeRequest';

import {SEND_REQUEST} from '../actions/scrapeRequest/newRequestActionConstants';
function* sendNewRequest({payload}){
    try {
        const { data } = yield call(sendRequest, payload);
        console.log(data);
    }
    catch(e){
        console.log(e);
    }
}

export default function* scraperSaga() {
    yield all([
        takeLatest(SEND_REQUEST, sendNewRequest)
    ])
}