I have the following URL which I want use to access the content in a remote Apache Tomcat server from a C-based client:
char url[] = "POST /myDir HTTP/1.1\x0D\x0AContent-Type: text/xml\x0D\x0AContent-Length:60\x0D\x0A\x0D\x0A<root><mygreeting>Hello, World!</mygreeting></root>\r\n";
However, I get the response "HTTP/1.1 505 HTTP Version Not Supported". I have googled and found that this may be due to character encoding of the url. So I am asking how can the contents of my array url be encoded in C so that it can be correctly interpreted by Tomcat.