{"id":550,"date":"2019-04-28T00:44:10","date_gmt":"2019-04-27T15:44:10","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2019\/04\/28\/xamarinforms_http\/"},"modified":"2019-04-28T00:44:10","modified_gmt":"2019-04-27T15:44:10","slug":"xamarinforms_http","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2019\/04\/28\/xamarinforms_http\/","title":{"rendered":"Xamarin.Forms \u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306e\u8868\u793a\u3068 Http\u901a\u4fe1"},"content":{"rendered":"<p><a href=\"https:\/\/www.amazon.co.jp\/Xamarin%E3%82%A8%E3%82%AD%E3%82%B9%E3%83%91%E3%83%BC%E3%83%88%E9%A4%8A%E6%88%90%E8%AA%AD%E6%9C%AC-Software-Design-plus-%E9%A4%8A%E6%88%90%E8%AA%AD%E6%9C%AC%E7%B7%A8%E9%9B%86%E9%83%A8\/dp\/4774188956\/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;keywords=xamarin&amp;qid=1556379680&amp;s=gateway&amp;sr=8-6&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=8b96e239c805b94e57133d8cd6856355\" target=\"_blank\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4774188956&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" border=\"0\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" style=\"margin: 0px !important; border: currentcolor !important; border-image: none !important;\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=4774188956\" border=\"0\"><\/p>\n<h2>1.\u5168\u4f53<\/h2>\n<p><a href=\"https:\/\/www.typea.info\/blog\/index.php\/2019\/04\/24\/google_app_engine_java_spring_bootvuetify_gae\">GAE\u306bSpring Boot \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u7f6e\u3057\u3001Web\u30a2\u30d7\u30ea\u3068\u3057\u3066Vuetify\u3092\u69cb\u6210\u3059\u308b<\/a>\u3068\u3068\u3082\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Xamarin.Forms \u3092\u5229\u7528\u3057\u3066\u4f5c\u6210\u3057\u305f\u3044\u3002<\/p>\n<h2><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/whole_eco_sys.png\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"294\" title=\"whole_eco_sys\" style=\"display: inline; background-image: none;\" alt=\"whole_eco_sys\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/whole_eco_sys_thumb.png\" border=\"0\"><\/a><\/h2>\n<p><a href=\"https:\/\/www.typea.info\/blog\/index.php\/2019\/04\/24\/visual_studio2019_xamarinformsios\">Xamarin\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092Visual Studio 2019 \u306b\u4f5c\u6210\u3001iOS\u306e\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3067\u30a2\u30d7\u30ea\u3092\u52d5\u304b\u3059\u3053\u3068\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/a>\u306e\u3067\u3001HTTP\u901a\u4fe1\u3067<a href=\"https:\/\/www.typea.info\/blog\/index.php\/2019\/04\/24\/google_app_engine_java_spring_bootvuetify_gae\">GAE\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u305fAPI\u3092\u547c\u3073\u51fa\u3057\u758e\u901a\u78ba\u8a8d<\/a>\u3092\u884c\u3044\u3001\u30a2\u30e9\u30fc\u30c8\u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u7d50\u679c\u3092\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3055\u305b\u308b\u3002<\/p>\n<h2>2.\u6e96\u5099<\/h2>\n<p>V<a href=\"https:\/\/www.typea.info\/blog\/index.php\/2019\/04\/24\/visual_studio2019_xamarinformsios\">iusal Studio2019 \u306eXamarin\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u4f5c\u6210<\/a>\u3055\u308c\u305f\u3001About\u30da\u30fc\u30b8\u306e\u30dc\u30bf\u30f3\u306b\u3001API\u547c\u3073\u51fa\u3057\u306e\u51e6\u7406\u3092\u4ed5\u8fbc\u3082\u3046\u3002<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/app-fundamentals\/navigation\/pop-ups\">https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/app-fundamentals\/navigation\/pop-ups<\/a><\/p>\n<p align=\"left\">Visual Studio\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u30dc\u30bf\u30f3\u306e\u51e6\u7406\u306f\u3001ViewModel\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u8868\u793a\u7528\u306e\u3001<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/api\/xamarin.forms.page.displayalert?view=xamarin-forms\">DisplayAlert()<\/a>\u3001<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/api\/xamarin.forms.page.displayactionsheet?view=xamarin-forms\">DisplayActionSheet()<\/a> \u3068\u3082\u306b\u3001Page\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001ViewModel\u5074\u304b\u3089\u305d\u306e\u307e\u307e\u3067\u306f\u53c2\u7167\u3067\u304d\u306a\u3044\u3002<\/p>\n<p align=\"left\">\u307e\u305a\u3001ViewModel(AboutViewModel)\u5074\u306b\u3001Page\u3092\u683c\u7d0d\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7528\u610f\u3002<\/p>\n<p><pre class=\"prettyprint linenums\">        public Page Page\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n<\/pre>\n<p align=\"left\">AboutPage.xmal \u3092\u898b\u308b\u3068\u3001\u4ee5\u4e0b\u306bViewModel\u306e\u53c2\u7167\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067\u3001<\/p>\n<p><pre class=\"prettyprint linenums\">    &lt;ContentPage.BindingContext&gt;\r\n        &lt;vm:AboutViewModel \/&gt;\r\n    &lt;\/ContentPage.BindingContext&gt;\r\n<\/pre>\n<p>AboutPage.xmal.cs \u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u53c2\u7167\u3092\u6e21\u3059\u3002<\/p>\n<p><pre class=\"prettyprint linenums\">        public AboutPage()\r\n        {\r\n            InitializeComponent();\r\n\r\n            if (this.BindingContext is AboutViewModel)\r\n            {\r\n                (this.BindingContext as AboutViewModel).Page = this;\r\n            }\r\n            \r\n        }\r\n<\/pre>\n<h2>3.API\u306e\u547c\u3073\u51fa\u3057<\/h2>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/data-cloud\/consuming\/rest\">https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/data-cloud\/consuming\/rest<\/a><\/p>\n<p>\u307e\u305a\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u758e\u901a\u3055\u305b\u308b\u3002\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3084\u3089\u306f\u8ffd\u3063\u3066\u78ba\u8a8d\u3002<\/p>\n<p>About\u30da\u30fc\u30b8\u306e\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u3089\u3001Xamarin\u306eWeb\u30da\u30fc\u30b8\u306b\u9077\u79fb\u3059\u308b\u3068\u3053\u308d\u3092\u7f6e\u304d\u63db\u3048\u3001hello API\u3092\u547c\u3073\u51fa\u3057\u3001\u7d50\u679c\u3092\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u8868\u793a\u3055\u305b\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">    public class AboutViewModel : BaseViewModel\r\n    {\r\n\r\n        public AboutViewModel()\r\n        {\r\n            Title = \"About\";\r\n\r\n            OpenWebCommand = new Command(RestTest);\r\n        }\r\n\r\n        private async void RestTest()\r\n        {\r\n            string uri = \"https:\/\/favophrase.com\/api\/hello\";\r\n\r\n            HttpClient client = new HttpClient();\r\n            var response = await client.GetAsync(uri);\r\n            if (response.IsSuccessStatusCode)\r\n            {\r\n                var content = await response.Content.ReadAsStringAsync();\r\n                bool answer = await this.Page?.DisplayAlert(\"REST API hello.\", content, \"Yes\", \"No\");\r\n\r\n                Debug.WriteLine(\"Answer: \" + answer);\r\n            }\r\n        }\r\n\r\n        public ICommand OpenWebCommand { get; }\r\n        public Page Page\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n    }\r\n<\/pre>\n<h2>4.\u7d50\u679c<\/h2>\n<p>\u30b7\u30f3\u30d7\u30eb\u306a\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3060\u304c\u3001\u4e0a\u8a18\u306e1\u3064\u306e\u30b3\u30fc\u30c9\u304c\u3001Anroid\u3001iPhone\u3001UWP\u30a2\u30d7\u30ea\u306e\u30a8\u30df\u30e5\u30ec\u30fc\u30bf(UWP\u306b\u3064\u3044\u3066\u306f\u3001\u5b9f\u6a5f\u3060\u304c\uff09\u3067\u60f3\u5b9a\u901a\u308a\u6a5f\u80fd\u3057\u305f\u3002\u306a\u304b\u306a\u304b\u611f\u52d5\u7684\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_android.png\"><img loading=\"lazy\" decoding=\"async\" width=\"184\" height=\"336\" title=\"rest_android\" style=\"display: inline; background-image: none;\" alt=\"rest_android\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_android_thumb.png\" border=\"0\"><\/a><\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_ios.png\"><img loading=\"lazy\" decoding=\"async\" width=\"179\" height=\"351\" title=\"rest_ios\" style=\"display: inline; background-image: none;\" alt=\"rest_ios\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_ios_thumb.png\" border=\"0\"><\/a><\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_uwp.png\"><img loading=\"lazy\" decoding=\"async\" width=\"359\" height=\"230\" title=\"rest_uwp\" style=\"display: inline; background-image: none;\" alt=\"rest_uwp\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Xamarin.Forms-alert_14D1A\/rest_uwp_thumb.png\" border=\"0\"><\/a><\/p>\n<p>\u3053\u306e\u8fba\u306f\u3001\u3042\u3068\u3067\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<p><p><a href=\"https:\/\/www.xlsoft.com\/jp\/products\/xamarin\/web_services.html\">https:\/\/www.xlsoft.com\/jp\/products\/xamarin\/web_services.html<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/ios\/app-fundamentals\/ats\">https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/ios\/app-fundamentals\/ats<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/data-cloud\/authentication\/rest\">https:\/\/docs.microsoft.com\/ja-jp\/xamarin\/xamarin-forms\/data-cloud\/authentication\/rest<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/aspnet\/core\/mobile\/native-mobile-backend?view=aspnetcore-2.2\">https:\/\/docs.microsoft.com\/ja-jp\/aspnet\/core\/mobile\/native-mobile-backend?view=aspnetcore-2.2<\/a><\/p>\n<p><a href=\"https:\/\/developer.xamarin.com\/samples\/xamarin-forms\/WebServices\/TodoREST\/\">https:\/\/developer.xamarin.com\/samples\/xamarin-forms\/WebServices\/TodoREST\/<\/a><\/p>\n<p><a href=\"https:\/\/www.xlsoft.com\/jp\/products\/xamarin\/web_services.html\"><br \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/%E3%81%8B%E3%81%9A%E3%81%8D%E3%81%AEXamarin-Forms%E5%85%A5%E9%96%80-%E5%A4%A7%E7%94%B0-%E4%B8%80%E5%B8%8C-ebook\/dp\/B01N7NI08L\/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;keywords=xamarin&amp;qid=1556379680&amp;s=gateway&amp;sr=8-9&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=bbfc86b0fc461406f18095aa692183a9\" target=\"_blank\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B01N7NI08L&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" border=\"0\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" style=\"margin: 0px !important; border: currentcolor !important; border-image: none !important;\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=B01N7NI08L\" border=\"0\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5168\u4f53 GAE\u306bSpring Boot \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u7f6e\u3057\u3001Web\u30a2\u30d7\u30ea\u3068\u3057\u3066Vuetify\u3092\u69cb\u6210\u3059\u308b\u3068\u3068\u3082\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Xamarin.Forms \u3092\u5229\u7528\u3057\u3066\u4f5c\u6210\u3057\u305f\u3044\u3002 Xamarin\u30d7\u30ed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[39,108,84,109],"tags":[],"class_list":["post-550","post","type-post","status-publish","format-standard","hentry","category-android","category-ios","category-universal-windows-platform","category-xamarin"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=550"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/550\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}