cf-abacus
cf-abacus copied to clipboard
Need "header" field in the batch body.
When I tried to use batch method to call several apis, and I used "if-match" headers in the several apis, then it will met issue: I cann't get the headers in the several apis. I think it is related to which is related to https://github.com/cloudfoundry-incubator/cf-abacus/blob/master/lib/utils/router/src/index.js#L129
For example:
POST http://localhost:11443/batch
body:
[
{
"method": "PUT",
"uri": "/v1/service/0bad702d61306bab3cf1daea4b861862",
"headers":
{"if-match": "2-5d465f5efc262c8be8f646bbcfc19fdc"}
,
"body": {
"resource_id": "TEST",
"free": false,
"lite": false
}
}
]
I will need the "if-match" header value in my code, but I cann't get the this header. It has bothered me several days, could you please help me on it? thanks.
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/155766944
The labels on this github issue will be updated when the story is started.
Supporting custom headers seems like a valid use-case. Currently we don't use it in Abacus, so implementing this feature is way down in our backlog.
However we accept contributions, so if you want to implement it, we'll be happy to help in our Slack channel.