.NET获取聚合数据接口数据(Http协议POST和GET请求)

本文介绍了如何通过.NET框架实现HTTP POST和GET请求,以访问和获取聚合数据接口的数据。文章提供了简单直接的代码示例,帮助读者理解这两种HTTP请求方法在实际应用中的操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    今天给大家一个小栗子,就是利用.NET访问聚合数据接口,之前有总结过Android端得栗子,也阔以可以瞧一瞧~

    简单粗暴得爱你们,刷代码啦

    

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Text;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Xfrog.Net;

public partial class _Default : System.Web.UI.Page
{
    //申请的密钥
    string appkey = "*******";

    //API访问网址
    string url1 = "http://v.juhe.cn/calendar/day";

    //设置访问参数
   IDictionary<string, string> parameters1  = new Dictionary<string, string>();

   
    protected void Page_Load(object sender, EventArgs e)
    {
          parameters1.Add("key", appkey);//申请的key
          parameters1.Add("date" , "2017-9-5"); //指定日期

          string result1 = sendPost(url1, parameters1, "post");

          Response.Write(result1);

       
           JsonObject newObj1 = new JsonObject(result1);
           String errorCode1 = newObj1["error_code"].Value;
 
            if (errorCode1 == "0")
            {
               // Response.Write("成功");
               // Response.Write(newObj1["result"]);

                JsonObject newObj = new JsonObject(newObj1["result"].ToString());
                Response.
Xfrog 3DS MAX PlugIn (07/04/2002) ======================================== Installation ------------------------------------------------- Copy the file xfrog.dlo into your plugins directory (e.g. c:\3dsmax42\plugins). Compatibility ------------------------------------------------- The PlugIn is compiled for discreet 3DS MAX 4.2+. It will not work with prior versions of 3DS MAX. Usage ------------------------------------------------- 1. Choose 'Import' from the 'File' Menu 2. Select 'Xfrog (*.XFR)' as File Import Filter and choose the Xfrog Model to import. Click OK. 4. The model and material should show up now. Feel free to modify the materials, changes made to the mesh itself will be overridden when the object is reevaluated. Options Panel ------------------------------------------------- The Animation Length Group lets you choose between the Animation Length preset in the file, a custom length to be specified, the length being scaled to fit the current animation length or to be ignored. For static models you should always change this setting to Ignore, this will prevent the model from being recreated when you move the frame slider. An existing Animation can be played back as a loop, swinging back and forth and only once. For faster redraws in viewport or for preview rendering you may also want to change the model quality in viewport and for rendering with the sliders at the bottom of the panel. If you need to access the geometry on a per component level you can do that by converting the object to an Editable Mesh, and choose Select By Material ID in Polygon Selection Mode. This will disable animation as the reference to the original Xfrog file is removed.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值