Comments (3)
But what would someone achieve by having a type in responseData of HttpResult ? Any use case ?
from fortjs.
Well this is for the maintainability and readability of the code. This would ensure that devs are only forwarding DTOs to frontend.
from fortjs.
Good point but adding this to framework itself is not a good idea as it might confuse some users. I will suggest you to create a wrapper in your code to return different types of result.
e.g -
function getResult<T>(result){
return jsonResult(result);
}
from fortjs.
Related Issues (10)
- Consider targeting more specific areas that could throw HOT 2
- Initializing of controller with body in tests doesn't actually initialize the body HOT 3
- Feature Request : The status code of the response should be available in the Wall HOT 1
- Async Promise antipattern is used HOT 3
- Feature Request: Allow ErrorHandler methods to return Promise<HttpResult> HOT 1
- Feature Request: Allow fortjs server to be hosted on https HOT 1
- Not working with many checkbox radio ? HOT 1
- Doc page is not working HOT 1
- Dependency injection stops working when using more than 2 singletons in a controller HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fortjs.