i have build an app on Symfony and a WebService REST for this app.
I have already build an Android application on the same idea of my Symfony project and i want to use the API (I'm on localhost) of my Symfony Application for consuming my Webservice in Android.
How can I do that without an OVH server or something else ?
Thank you ;)
You just need to send HTTP request to your webservice by specifing the endpoint as your local IP address.
You can use a third-part library as https://github.com/square/retrofit to do that properly, or with the native android http request manager : https://developer.android.com/reference/java/net/HttpURLConnection.html
Related
How can I make an HTTP request from a web application (like node js) to an android app?
The goal is to read if the response is a success, for example, from Web to Web I make an HTTP request to the IP/URL and, if it returns 200, I have success. It would work as a "ping" to check if the android app is "alive".
Note: I don't know apps architecture
Thanks!
Using web sockets ( example here: https://www.html5rocks.com/en/tutorials/websockets/basics/ ) will help u to achieve it
I'm trying to fetch a WEB API create in .NET CORE but the return is always Network Error, i'm using axios to fetch api.
I'm using the URL with my ip adress(https://MY_IP:1258/)(just like when i create Node api's) and already tries CORS solution(not work)
I had already tried to fetch PokeApi and it's OK.
Thats the implementation on axios, simple
Api get on my real android device
The Error
In the .net core project right click on properties and go to the debug tab. In the APP URL field you should have something like http://192.168.1.2:80
I have a web api and 2 another apps 1 is in xamarin and another is in angularjs.
I am calling api in xamarin Using HttpClient.
I am calling api in angularjs using $http service .
Now I want to implement different logic for HttpClient call and $http call, how can I recognize the web request client?
You can use the different User-Agent or custom HTTP header when making the web request.
You can find more details here: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields
I am trying to post data from my client android application to a django server.
for example I have User {login:---, email:---} and I wanna post them my LOCAL SERVER based on django.. what I should do ? any link or tutorial can be greatful, i can't find any thing really helpful.Thks
You need to make a HTTP request to your django server. Here is a similar question how to do a post request in android
I have a ASP.NET website deployed to IIS with a couple of ashx that returns JSONs to be consumed by an Android application.
I have implemented an authentication logic using Basic Authentication.
The problem: When accessed from Android, the server response is a 400 Bad request. The httperr log file says "400 - Hostname -".
It works when I try it out on localhost from Android emulator
It works when accessing the ashx file on the server from a browser
It works when replicating the call in Fiddler
(If I use Fiddler with the Android Emulator, the Response will be -1 (and looking in Fiddler at the raw data sent, it seems to loose the host from the url) - but this is another issue so don't dwell on that, i just thought I would mention it...)
Turns out my problem (and solution) was the same as in this thread:
HTTP POST request with authorization on android