2017-10-17 2 views
0

저는 xamarin을 처음 사용했습니다. json 데이터를 웹 서비스와 함께 추가하고 싶습니다. 나는 다음과 같이 시도한다 :Xamarin은 매개 변수가있는 웹 서비스를 얻습니다.

var response = await client.GetAsync("myurl" + "?applicationid=" + 
    applicationId + "?siteid=" + siteId + "?userid=" + userId"); 
string responseJson = await response.Content.ReadAsStringAsync(); 
Debug.WriteLine("response:>" + responseJson); 

그러나 get 방법 후에는 코드가 실행되지 않는다.

제발 도와주세요. 미리 감사드립니다. :)

+1

마지막으로 해결책을 얻은 다음 URL 자체. var 응답 = 대기 client.GetAsync ("mybaseurl"+ "/ applicationid /"1/siteid/"5/userid /"+ 25 "); –

답변

0

마지막으로 해결책을 얻었으므로 URL 자체에 값을 전달하십시오. var response = 클라이언트를 기다립니다 .GetAsync ("mybaseurl"+ "/ applicationid /"1/siteid/"5"/ u serid/"+ 25");

관련 문제