mike442144 / seenreq Goto Github PK
View Code? Open in Web Editor NEWGenerate an object for testing if a request is sent, request is Mikeal's request.
License: MIT License
Generate an object for testing if a request is sent, request is Mikeal's request.
License: MIT License
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>
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.
When normalize url , should remove string after #
Is there any way to set an expire time for a key? thanks.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.