1

I started making a app with C#(Xamarin) and now I want to send data fron C# to a PHP or node.js server.

I want to use http(System.Net.Http) to make a simple login, can I run a method directly or do I have to send a json package and recieve it back?

If there are better methods pleas tell me

hansi_reit
  • 368
  • 4
  • 16

1 Answers1

0

I think that the best way is to send a POST request using .Net.Http and receive it on your server. Then return a json array with the results for example:

...Login logic...
$result = ['status' => 'success', 'report' => 'Your data is correct'];  

die(json_encode($return));

You can parse that JSON using libs from C#.

Conclusion: For me the best and secure way is to encript your POST data, send to server then return json response.

Jefferson Javier
  • 317
  • 2
  • 10