Webview post request vs http post request in android - 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?

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.

Postman can't send post request to server and server detecting it as get request instead of post

Having issue in postman can't send post request to the server.
So I have
#GetMapping("/{id}")
public blablabla (#PathVariable long id )
#PostMapping("/scan")
public blablablabla(){}
Somehow when I send post request for /scan via postman it returns
Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long';
nested exception is java.lang.NumberFormatException: For input string: \"scan\
But it works fine in my android application.
Is this postman issue?
Thank you
I've got the answer..
In postman, I send http request to my https server.
So it's redirecting it making it a GET request instead of my POST request.

HTTP basic request in Android

I want to do a POST HTTP request to the serving to receive some cookies from the server. During this POST request I also need to send some data like login and password. I found a lot of solutions but nothing is working, everything that I found is deprecated.
So the question is: how can I make a HTTP POST request to receive form the server some cookies after?

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?

Http requests from android app to django server

I am able to log into the django server using an Http Post request, but when I go to see if the user is authenticated immediately after I am getting a HTTP/1.1 401 UNAUTHORIZED response.
I am using the same DefaultHttpClient for both the post and the get request by means of a static member.
I have already attempted adding the sessionid cookie from the POST request to the GET request as a header.
Is there anything I am missing?

Categories

Resources