Giter Site home page Giter Site logo

seenreq's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

seenreq's Issues

SOAP support

Maybe add SOAP support when posting. Body like below:

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/baseInfo/" xmlns:ns2="http://us.xueersi.org/namespace/">
  <SOAP-ENV:Header>
    <ns2:authentication SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">
      <authinfo>...</authinfo>
    </ns2:authentication>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:xxx><request>{"bbq":"0"}</request></ns1:xxx>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Browserify cannot handle variable requires

Error: Cannot find module './repo/repo_default.js'

Essentially browserify cannot handle & analyze structure like this. Generally it is considered a bad approach to use variable requires.

expire time?

Is there any way to set an expire time for a key? thanks.

TypeError: callback is not a function

I'm trying to integrate seenreq with node-crawler, but at this point just setting up seenrq with redis.

Here is my app code:

import express from 'express';
var Crawler = require("crawler");
const seenreq = require('seenreq')

const app = express();

app.get('/', (req, res) => {
    res.json("Working...")
})

app.get('/seen', (req, res) => {
    let seen = new seenreq({
        repo:'redis',
        host:'127.0.0.1',
        port:6379,
        clearOnQuit:false
    });

    var url = "http://www.GOOGLE.com";
    seen.exists(url,{
        callback:function(err,result){
            if(err){
                console.error(err);
            }else{
                console.log(result);
            }
        }
    });
})

app.listen(8080, () => console.log('Running on localhost:8080'));

When I run and navigate to http://localhost:8080/seen, I get this error:

Running on localhost:8080
C:\prod\crawler\node_modules\bluebird\js\main\async.js:43
        fn = function () { throw arg; };
                           ^

TypeError: callback is not a function
    at setByKeys (C:\prod\crawler\node_modules\seenreq\repo.js:66:3)
    at RedisRepo.setByKeys (C:\prod\crawler\node_modules\seenreq-repo-redis\index.js:36:13)
    at getByKeys (C:\prod\crawler\node_modules\seenreq\repo.js:62:11)
    at tryCatcher (C:\prod\crawler\node_modules\bluebird\js\main\util.js:26:23)
    at Promise.successAdapter (C:\prod\crawler\node_modules\bluebird\js\main\nodeify.js:23:30)
    at Promise._settlePromiseAt (C:\prod\crawler\node_modules\bluebird\js\main\promise.js:582:21)
    at Promise._settlePromises (C:\prod\crawler\node_modules\bluebird\js\main\promise.js:700:14)
    at Async._drainQueue (C:\prod\crawler\node_modules\bluebird\js\main\async.js:123:16)
    at Async._drainQueues (C:\prod\crawler\node_modules\bluebird\js\main\async.js:133:10)
    at Immediate.Async.drainQueues (C:\prod\crawler\node_modules\bluebird\js\main\async.js:15:14)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
    at process.topLevelDomainCallback (domain.js:121:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Please any help will be very appreciated. Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.