c# - Cannot get HttpClient working with PCL -


i'm trying hard use httpclient lib in project.

i can't figure out what's going on...

i tried local urls, examples online, on xamarin.forms pages , nothing. doesn't work , can't figure out doing wrong here.

this code: (taken here, btw: https://github.com/conceptdev/xamarin-forms-samples/blob/master/httpclient/httpclientdemo/earthquake/geonameswebservice.cs)

enter image description here

the second breakpoint never hit.

this references section:

enter image description here

i tried manually inserting system.net.http saw in examples, doesn't work:

enter image description here

any ideas?

edit

to add more information. if use local server , set breakpoint there, never hit well. looks request never "leaves" application. , think related not being able add system.net.http. don't know... it's stressing me out...

waiting resolve:

enter image description here

fiddler:

#   result  protocol    host    url body    caching content-type    process comments    custom   3675    200 http    api.geonames.org    /earthquakesjson?north=44.1&south=-9.9&east=-22.4&west=55.2&username=bertt  1,232   no-cache    application/json;charset=utf-8  windowsformsapplication1.vshost:18544            

target:

enter image description here

this more troubleshooting @ point, because there numerous things going wrong.

  1. download fiddler, , try typing url in see if receiving response.

  2. clean solution, , rebuild.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -