Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do i hit the server(Dot Net Web API) with xamarin app using url

$
0
0

In Xamarin

var bcc = "Sandeep Subbiah";
var usb = "http://localhost:53325/";
StringContent stringContent = new StringContent(bcc, System.Text.Encoding.UTF8);
HttpResponseMessage reponse = await client.PostAsync(usb, stringContent);

In Dot Net Web API

[System.Web.Http.Route("api/Values/UploadFile")]
        public ActionResult UploadFile(string file)
        {
            return Json(new { status = "success"});
        }

How do i get the contents from Xamarin to Dot Net Web API and return the SUCCESS message back to Xamarin


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>