curl-library
post without specific variable name
Date: 24 Jan 2002 13:35:36 +0100
Greetings,
I'm trying to reproduce the following javacode into c.
This is no problem except for "writer.println(theXMLMessage)", which is
a java string containing a XML document..
curl doesn't seem to want to post without naming a variable, using
libcurl 7.9.2.
URL url = new URL(location);
huc = (HttpURLConnection)url.openConnection();
huc.setRequestMethod("POST");
huc.setRequestProperty("Host", url.getHost());
huc.setDoOutput(true);
PrintWriter writer = new PrintWriter(huc.getOutputStream());
writer.println(theXMLMessage);
writer.flush();
writer.close();
BufferedReader br = new BufferedReader(new
InputStreamReader(huc.getInputStream()));
String line;
while((line = br.readLine()) != null){
response.append(line);
response.append("\n");
}
-- regards robinReceived on 2002-01-24