rdf-ext-archive / rdf-body-parser Goto Github PK
View Code? Open in Web Editor NEWRDF body parsing middleware: REPLACED BY https://github.com/rdfjs-base/express-handler
RDF body parsing middleware: REPLACED BY https://github.com/rdfjs-base/express-handler
It looks like body-parser
is a dependency but it's not included in package.json
When using rdf-body-parser with Restify I get an error:
{"code":"InternalError","message":"req.get is not a function"}
I guess this is a express function. Would be great if the code does not require this as it is useful outside express use cases as well.
Code: https://github.com/rdf-ext/rdf-body-parser/blob/master/index.js#L30
Hi,
when I get a parser error as
/home/...my-project.../node_modules/n3/lib/N3Util.js:49
throw new Error(literal + ' is not a literal');
^
Error: is not a literal
at Function.N3Util.getLiteralLanguage (/home/...my-project.../node_modules/n3/lib/N3Util.js:49:13)
at toRdfNode (/home/...my-project.../node_modules/rdf-parser-n3/index.js:60:30)
at pushTriple (/home/...my-project.../node_modules/rdf-parser-n3/index.js:80:11)
at Object._callback (/home/...my-project.../node_modules/rdf-parser-n3/index.js:89:7)
at Object.N3Parser._readPunctuation (/home/...my-project.../node_modules/n3/lib/N3Parser.js:454:12)
at Object.N3Parser._readDataTypeOrLang (/home/...my-project.../node_modules/n3/lib/N3Parser.js:296:41)
at /home/...my-project.../node_modules/n3/lib/N3Parser.js:683:35
at Object.N3Lexer._tokenizeToEnd (/home/...my-project.../node_modules/n3/lib/N3Lexer.js:262:7)
at Immediate._onImmediate (/home/...my-project.../node_modules/n3/lib/N3Lexer.js:318:38)
at processImmediate [as _immediateCallback] (timers.js:383:17)
my application exits immediately. It would be great if the body parser would treat this error more gently, like answering the errorneous HTTP request with a 400
response and not killing the application. Cheers!
@bergos this is genius
look at send
.
This can do .send(404)
, .send(404, "Oh noes")
or just .send("oh yeah")
There should be a check if there is a parser available for the content-type of the request. Here should be the check.
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.