Do I need to add Microsoft.net.http? monoAndroid?

0

I'm trying to make my app pass data through a web api. I try to put the Microsoft.net.http package through nugetPackage but it returns in error. If it is necessary how do I solve this? The

    
asked by anonymous 16.05.2017 / 21:15

1 answer

0

Yes, you need to add a package, however you are trying to add the wrong package.

The package name is System.Net.Http

1. Adding the package

  • Right click on the References of your project and select the Manage NuGet Pacakages ...

  • Ontheopenscreen,clickontheBrowseorBrowsetab,typesystem.net.http,clickonthepackageshownintheimageandthenclickInstallorInstall.

  • YoucanusetheSystem.Net.HttplibrarytomakeHTTPrequests,suchasconsuminganAPI.

2.UsingtheSystem.Net.Httplibrary

  • Tousethislibrary,firstaddtwousingatthetopofyourclass(onlythefirstisneeded,butsinceitwillconsumeaWebAPI,youcanalreadyaddthetwoasyouwillneedit):

  • Onceyou'vedonethis,youcanstartcreatingthemethodstoconsumetheAPIyouwant.BelowisanexampleimageandlinktoanarticlethatshowshowtoperformRESToperationsonaWebAPI.

  • Article: Consuming RESTful Web Service
23.05.2017 / 15:04