Yes it seems to work! I will get real devices next week. Later, I will
test on those.
On Tuesday, October 23, 2012 9:44:57 PM UTC+3, Archana wrote:
>
> Hi, I did a HTTP Post from client. In server, I am able to see like,
> POST /HTTP/ 1.1
> Content Length: 41
> Content-type: application/json
>
Archana wrote:
> Hi,
>
> So should I set the status code using Apache Core like
> HttpResponse response = new
> BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
> response.setEntity(new StringEntity("Got it"));
> conn.sendResponseHeader(response);
> conn
Hi,
So should I set the status code using Apache Core like
HttpResponse response = new
BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
response.setEntity(new StringEntity("Got it"));
conn.sendResponseHeader(response);
conn.sendResponseEntity(response);
Archana wrote:
> Hi,
>
> If I use Sockets to post the JSON(instead of HTTP Post), how will I
> retrieve the JSON and status code in the server?
> Also with HTTP Post, I want to retreive both(the status code and JSON). Can
> you please suggest an example?
>
> Thanks!
>
what status code? a status
Hi,
If I use Sockets to post the JSON(instead of HTTP Post), how will I
retrieve the JSON and status code in the server?
Also with HTTP Post, I want to retreive both(the status code and JSON). Can
you please suggest an example?
Thanks!
On Wednesday, October 24, 2012 3:29:16 PM UTC+3, skink w
Thank you for your support! As I am still a learner(with just 3 months
working in Android), I have some problems.
On Wednesday, October 24, 2012 3:29:16 PM UTC+3, skink wrote:
>
>
>
> Archana wrote:
> > Hi, my problem is similar
> > to
> stackoverflow.com/questions/13046872/receiving-data-fro
Archana wrote:
> Hi, my problem is similar
> to
> stackoverflow.com/questions/13046872/receiving-data-from-http-post-using-sockets
>
> Can someone help me?
>
if you learned how to efficiently use google instead of asking people
each time you have any problem you would find this:
http://stack
Hi, my problem is similar
to
stackoverflow.com/questions/13046872/receiving-data-from-http-post-using-sockets
Can someone help me?
On Wednesday, October 24, 2012 9:57:33 AM UTC+3, skink wrote:
>
>
>
> Archana wrote:
> > Actually when I print using
> > InputStreamReader
Archana wrote:
> Actually when I print using
> InputStreamReader isr = new
> InputStreamReader(socket.getInputStream(),"utf-8");
> BufferedReader br = new BufferedReader(isr);
> int b;
> StringBuilder buf = new StringBuilder();
> Log.d("Before while","whil");
> while
Actually when I print using
InputStreamReader isr = new
InputStreamReader(socket.getInputStream(),"utf-8");
BufferedReader br = new BufferedReader(isr);
int b;
StringBuilder buf = new StringBuilder();
Log.d("Before while","whil");
while ((b = br.read()) != -1) {
b
Archana wrote:
> Hi, when I use that,
> StringWriter writer = new
> StringWriter();
> IOUtils.copy(socket.getInputStream(),writer,HTTP.UTF_8);
> String string = writer.toString();
> Log.d("Writer value is : ",writer.toString());
> Nothing is getting printed
Hi, when I use that,
StringWriter writer = new
StringWriter();
IOUtils.copy(socket.getInputStream(),writer,HTTP.UTF_8);
String string = writer.toString();
Log.d("Writer value is : ",writer.toString());
Nothing is getting printed in console. Can you provide
Archana wrote:
> Hi, I did a HTTP Post from client. In server, I am able to see like,
> POST /HTTP/ 1.1
> Content Length: 41
> Content-type: application/json
> Host:10.0.2.15:5001
> Connection: Keep Alive
>
> How do I retrieve the content of JSON using socket.getInputStream()?
>
> Any example/hel
13 matches
Mail list logo