Custom HTTP headers with XmlRpcClient
-
09-10-2019 - |
Question
I was wondering if anyone knows how to send custom HTTP headers using an XmlRpcClient in Java?
I see a custom header can be set using XmlRpcHttpTransport.setRequestHeader() but I don't see a way of tying this in with the XmlRpcClient itself.
Solution
I Encountered the same problem and solved it by implementing XmlRpcTransport and overriding initHttpHeaders method. Here is an example: http://jugojava.blogspot.com/2011/03/custom-http-headers-with-xmlrpcclient.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow