Skip to content
Advertisement

Tag: network-programming

How to set proxy header in HttpURLConnection

I am trying to build an HTTP request to be sent via a proxy that accepts a proxy header. I am trying to find a way to set that, but couldn’t see it. Below is the curl command which I need to convert to the Java code. curl -i -u user:pwd -k GET –http1.1 –proxy-insecure https://localhost:8443 –proxy-header “X-Connect-Client-Id: abcde” https://target_host/api

Apache Telnet Client does not recevie non-ASCII characters

I’ve been trying to useorg.apache.commons.net.telnet.TelnetClient and I am having trouble to receive non-ASCII characters (in my case polish chars like ą,ę,ć,ź and few others). The problem is not on server side – when I use default Ubuntu telnet implementation or Putty I have no problem receiving non-ASCII characters. My code looks something like this (simplified a bit for readability): I

Netty vs Apache MINA

They both provide roughly the same functionality. Which one should I choose to develop my high-performance TCP server? What are the pros & cons? Reference links: Apache MINA (source) Netty (source) Answer While MINA and Netty have similar ambitions, they are quite different in practice and you should consider your choice carefully. We were lucky in that we had lots

Advertisement