Receving http network response code in app - android

I want to get the network response code of server in webview/BrowserFrame/WebViewClient.
Eailer it was working fine until 2.3 but from 3.0 /4.0 WebViewClient API(onReciveError) is not working and No http resource response is available in app.
I there any other alternative to recive it whenever I pass a url to webview.

Related

Soap webservice in android is not working

I have soap web service url. The same url is working with login method in one android application, I am able to logged in to the app. When I use same url and different login method in my second app I am getting
org.ksoap2.transport.HttpResponseException: HTTP request failed, HTTP status: 403 exception.
My soap webservice url is working fine on browser and postman. My url is http not https.

Webview post request vs http post request in android

I am working on payment integration with bank. When I do http post request with url and formencoded data , I am getting error html page. But if I am doing the same using webview , I am getting successul otp page of the bank. I am not sure why this response is different. As of now we have to do only http request and wanted the same response as returned by webview. I have tested same request in postman. I am getting successful otp page. What can be possible reason?

WAMP Server, started getting 403 forbidden response from Android activity

I have a web service which is hosted on my WAMP Server. URL: http://localhost/appname/service.php
I have an Android application which calls methods of the web service.
In LogCat I can see the response is a generic HTML page saying 403 Forbidden, you do not have access to the page etc, however when I go to the URL which the Android code called I can access the service just fine.
In the Apache error log I have
AH01630: client denied by server configuration: C:/wamp/www/appname/service.php
How come I can access the URL directly through my browser but not through my device? Both are on the same wifi network.
This was working previous (for the past month).
First tip: Your networking job should be made inside AsyncTask instead of an Activity. http://developer.android.com/reference/android/os/AsyncTask.html
Second tip: How are you building your HTTP request?

How to send a HTTP POST request with a cookie attached in WebView?

I am using WebView in Android. My ASP.NET Server set a cookie in WebView which is used to track user. Every thing works fine. Now I need to send an explicit HTTP POST request to server with the same cookie. Is it possible?

Android get request and response objects from webview

is there a way to get request and response objects from a webview?
for requests made from some webpage running in my webview, i want to intercept the full http request object(the headers, http method used, http body etc) and divert and send across that request into another channel.
For responses received from the webview, i want to do the same and get the object and its properties.
So far i have looked at the webviewClient android class which allows you to intercept url links executed by a webpage and intercept the resources it loads.
However, what i want to intercept, is any actual http requests the webpage makes. is this possible in Android webview?
thanks
That is not directly possible. You are welcome to write an HTTP proxy, then attempt to get WebView to work with that (e.g., see if it supports the http.proxyHost and http.proxyPort system properties).

Categories

Resources