jblaak / fitted Goto Github PK
View Code? Open in Web Editor NEWSimplifying http requests using ES decorators
Simplifying http requests using ES decorators
For example:
class Foo {
constructor() { this.bar = 'asdf'}
@get('/something')
method(req, res) {
this.bar;//should be 'asdf'
...
}
}
However this.bar
inside of method
will be undefined
Allow returning plain text.
Should make a list of to be allowed settings
Where you can alter the input of the request
function to set headers, since most of the time you always want to add something like an accept: application/json
header, now you have to define that in all of them
I've been trying to send over POST a JSON stringified object and am expecting to receive the same. Athough using a custom processor, req/res typeof is a string and methods such as 'isOk' can't be bound to it.
TypeError: Cannot create property 'method' on string
Maybe using another decorator called @base('http://www.thebase.com')
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.