Hello Micky,

>_I still run the examples of HttpClient 4.0-alph2 and HttpCore 4.0-beta1
>_release.

Isn't there an example for a POST request?
Sorry, I'm on a webmailer and don't have time
to search myself.

>_But I still can't find there is a method or any way to replace
>_HttpURLConnection.getOutputStream() function.

You don't get an output stream, you specify
and HttpEntity to be sent. If you have a String,
use the StringEntity.

>_And I see the suggestion you give me at
>_http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/Ht
>_tpEntity.html#writeTo(java.io.OutputStream)

See, there the output stream is given to the entity.

>_I don't know where to generate the OutputStream for HttpEntity.writeTo().

You don't. HttpCore/HttpClient does.

>_You mean that I need to implement it (ObjectOutputStream) for myself?

If you want to send objects, you have to do that.
If you want to send a string, use StringEntity.

>_If I use ByteArrayEntity and set it to the HttpEntities at client-side code,
>_does the server-side code need to use HttpCore or HttpClient library to
>_receive the request?

Client and Server communicate over TCP/IP sockets.
The data exchanged is defined by various RFCs, first
and foremost RFC 2616. The server does not depend on
_how_ the client generates the data, nor does the
client depend on how the server parses the data.

>_I just want to change the client-side code. I don't want to change the
>_server-side code.

Then don't.

>_> Please be more specific. What does the server get? Is there an
>_> error response? An exception? Unexpectedly closed connection?
>_The server get "null" from request.getParameter() when I use
>_HttpPost.setParameter().

How about HttpPost.setEntity()?

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to