This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
A lot of REST services require setting the Authorization Header on a request instead of having credentials in the URL. E.g. to use the Twitter Bearer Token for application only requests, which is the simplest form ( https://dev.twitter.com/oauth/application-only ) one needs to set the Authorization header for the request. Right now this is not possible with @onreceive. There should be a way to add request headers in order to comply with this widespread practice.
Created attachment 153797 [details] A patch introducing @OnReceive.headers() I think Max's problem could be solved by adding on more attribute to the @OnReceive annotation. The API is simple. The actual SPI may not be optimal, but please Max, give the patch try and let us know if it works for you.
Alternative providers of various @OnReceive SPI, please verify you are OK with the change. We have about a week to consider the impact of this change and polish the patch to include appropriate API change attributes.
No objections so far. I'd like to integrate tomorrow.
Created attachment 153911 [details] The final diff with javadoc comments
http://hg.netbeans.org/html4j/rev/bdec4103bdb2