Comments (3)
Currently, Accent only supports sending JSON responses.
Part of the reason is that Plug makes it difficult to mess with the response body. I have to manually decode the JSON body, transform the keys, then re-encode the body back into JSON. I have to know the content-type in order to know that's a safe operation. Otherwise, Accent would crash if the content-type was anything other than JSON.
Hopefully, that makes sense. I'm open to suggestions if you have any.
from accent.
Why not use the response's content-type, as opposed to the content-type of the request?
from accent.
Closing due to inactivity.
from accent.
Related Issues (7)
- Add default response case transformation HOT 4
- camelCase and PascalCase HOT 3
- get_resp_header in before_send_callback instead of get_req_header? HOT 2
- Ways to ignore or support Plug.upload on request HOT 3
- Should apply Accent.Plug.Response without specifying Content-Type: application/json HOT 5
- snake case adding extra _ HOT 1
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 accent.