headers.中没有add这个选项 如果打出去了会显示“ 未能找到类型或命名空间“uri”(是否缺少USING指令或者程序集引用)
HttpWebRequest uri =(HttpWebRequest)WebRequest.Create("http://apis.baidu.com/apistore/idservice/id="+param);
uri.Method="GET";
uri.Headers.add
问题代码
using 引用:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using System.Net;
using System.Text.RegularExpressions;
using System.Net.Http;
using Windows.UI.Popups;
using Windows.Web.Syndication;