Comments (6)
This would be a worthwhile enhancement.
from ardielle-tools.
Do we want both custom "sticky" headers like the current credentials, as well as per-request custom headers? The latter would most easily be done by modifying the generated API to take an extra argument (a http.Header), which would create incompatibilities. The sticky headers would be trivial to add, in comparison
from ardielle-tools.
In the case I'm thinking about, we would be ok with sticky credentials - so long as there was some way to "update" them (e.g. to refresh a header value). Even if that meant calling "AddHeaders()" again, that would probably be ok.
from ardielle-tools.
Would probably need to add API to SetHeader instead of AddHeader (which will accumulate a list of values). Sticky headers is easy enough that I can see doing that now, per-request headers may require some API work, not quite ready to do that.
from ardielle-tools.
Why couldn't you do all this in a custom transport? We already do user-agent injection and other stuff like this using a custom transport.
from ardielle-tools.
Good point. The other reason I've dragged my feet is that headers are technically part of the API, and I'd prefer API details to be explicit in the RDL itself (an approach which also allows adding whatever headers you want in a more formal way).
from ardielle-tools.
Related Issues (20)
- generated go client does not return http request status if response is not Json
- Generating TypeScript
- resource "name" attribute is ignored in code generation
- Markdown & swagger generator are not in release packages HOT 1
- java server @Path annotation assumes root servlet support HOT 2
- Can basePath be a standard of rdl format? HOT 4
- gRPC interop
- Use of JsonSerialize.Inclusion.NON_DEFAULT in java model classes ends up generating "empty" output
- Request Object form for Client and Handler w/ support for context HOT 2
- Comment issue with enum HOT 1
- @Produces application/json annotation on OPTIONS methods incompatible with latest Firefox CORS requests
- Embedding a Go type generated by RDL into another Go type that is hand-written causes panics in JSON serialization HOT 1
- unable to alias bytes HOT 2
- Please add example support HOT 11
- [markdown generator] wrong anchor. HOT 2
- support http status code 429 (rfc6585)
- Go: Bad codegen when using colliding method + type APIs
- Comments in markdown syntax
- Generated go code for rdl with more than one enums with same value is unusable HOT 5
- Bad codegen for HEAD verb
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 ardielle-tools.