Community
Participate
Working Groups
Currently, the ECF filetransfer API allows arbitrary options (Map) to be specified upon initiating a file transfer. It would be useful to allow clients to specify request headers as an option.
Setting target milestone to 3.1
Additionally an API that allows clients to see received responses with headers (but not their payload) and to be able to add, remove or modify headers of outgoing requests would be valuable. Clients using the API would be protocol aware for example HTTP unless they used it only for logging, for example to log failed requests. This would allow for more dynamic usage of headers based on server responses and also would allow client to take into account redirects etc.
This has been added in 3.6 release cycle. Resolving as fixed.
As this is marked as fixed: Where can I find information how to do so? I'd like to filter all ECF requests and add custom header to it. I have searched for a while but can't find any information about this, maybe I'm using the wrong keywords?
See the source and javadocs for this constant: org.eclipse.ecf.filetransfer.IRetrieveFileTransferOptions.REQUEST_HEADERS Here in git repo http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferOptions.java Using this key, a Map of header name/values can be passed in options and the names/values will be put into the request as request headers/values. The code for this for httpclient4 provider (currently one used by p2 on apache httpclient) is here: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientRetrieveFileTransfer.java Line 379: setRequestHeaderValuesFromOptions() method.