HttpUtils and HttpResponse

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I am using HttpUtils, specifically looking at the server module and HttpResponse. I would like to somehow get the entire server response including the status line, the complete headers, and the message portion.

I would like to be able to look at certain fields, in code, maybe modify it a little bit, and finally pass it off as a string to a WebView.

Playing around with the HttpResponse I am only able to get the message portion using the GetString, GetInputStream, or GetAsynchronous function calls. I am able to get the header information with GetHeaders. I am not able to get the status line.

I would like to get the entire http response as a single string or stream – including all three sections.

Is there a way to get the entire http response? If I get the entire response and pass it off to a WebView, if I click on a link in the page showing, will the WebView send a proper request to the server – including headers and cookies?

Thanks,
Barry.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
If I get the entire response and pass it off to a WebView, if I click on a link in the page showing, will the WebView send a proper request to the server – including headers and cookies?
I'm not sure and I recommend you to first make some simple tests to see if it works. You can use FireBug with FireFox to build the required string.
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
I'm not sure and I recommend you to first make some simple tests to see if it works. You can use FireBug with FireFox to build the required string.

Thanks.

Is there a way to get the entire http response?

Using the HttpResponse methods GetAsynchronously, GetInputStream, GetString, GetHeaders, I don't receive the full http response from the server (all three parts: status, headers, message).

I get only the headers, or the message. Never the status line, and never the entire response.

Thanks,
Barry.
 
Upvote 0
Top