View config.json
{"defaultType": "text/html"}
View rpcCall.json
{
"methodCall": {
"methodName": "examples.echoParams",
"params": [
"#dateTime=2018-06-10T19:41:06.199Z",
"#base64=aGVsbG8gd29ybGQ="
]
}
}
View config.json
{
"#pagePark": {
"urlRedirect": "http://scripting.com/"
}
}
View s3FolderExists.js
function s3FolderExists (s3path, callback) {
var flHaveCalledBack = false;
var splitpath = s3.splitPath (s3path);
var pathToLookFor = splitpath.Key + "/";
s3.listObjects (s3path, function (obj) {
if (obj.flLastObject === undefined) {
if (utils.beginsWith (obj.Key, pathToLookFor)) {
if (!flHaveCalledBack) {
callback (true);
flHaveCalledBack = true;
View config.json
{
"s3ServeFromPath": "/publicfolder.io"
}
View iconvLiteExample.js
const iconv = require ("iconv-lite");
const request = require ("request");
const utils = require ("daveutils");
var feedUrl = "https://www.presseportal.de/rss/dienststelle_110972.rss2";
function getCharset (httpResponse) {
var contentType = httpResponse.headers ["content-type"];
if (contentType !== undefined) {
var encoding = utils.trimWhitespace (utils.stringNthField (contentType, ";", 2));
View iconv-lite-test.js
const iconv = require ("iconv-lite");
const request = require ("request");
const utils = require ("daveutils");
var feedUrl = "https://www.presseportal.de/rss/dienststelle_110972.rss2";
function getCharset (httpResponse) {
var contentType = httpResponse.headers ["content-type"];
if (contentType !== undefined) {
var encoding = utils.trimWhitespace (utils.stringNthField (contentType, ";", 2));
View derefurl.js
const request = require ("request");
function derefUrl (url, callback) {
var theRequest = {
method: "HEAD",
url: url,
followAllRedirects: true
};
request (theRequest, function (err, response) {
if (err) {
View decode.js
const Iconv = require ("iconv").Iconv;
const request = require ("request");
const urlTestFeed = "https://www.presseportal.de/rss/dienststelle_110972.rss2";
request (urlTestFeed, function (err, response, theString) {
var iconv = new Iconv ("ISO-8859-1", "UTF-8");
theString = iconv.convert (theString.toString ()).toString ();
console.log (theString);
});
View handydandystringparser.js
exports.parseString = parseFeedString;
var myProductName = "daveReadFeed"; myVersion = "0.4.0";
const request = require ("request");
const feedParser = require ("feedparser");
const utils = require ("daveutils");
const stream = require ("stream");
const Iconv = require ("iconv").Iconv;