2021
01-12
01-12
c#发送请求访问外部接口的实例
我就废话不多说了,大家还是直接看代码吧~stringurl="https://cloud.soei.com.cn/smsapi/sms/verifycode";HttpClienthttpClient=newHttpClient();httpClient.BaseAddress=newUri(url);//表头参数stringtoken="9c0025b4aae442bda5498971ec1ab219";httpClient.DefaultRequestHeaders.Add("token",token);httpClient.DefaultRequestHeaders.Accept.Clear();httpClient.DefaultRequestHeaders.Acc...
继续阅读 >