using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using aliyun_api_gateway_sdk.Constant;
using aliyun_api_gateway_sdk.Util;
namespace APISDK.Util
{
public class CallService<T>
{
private const string Host = "API网关地址";
private const string AppKey = "AppKey";
private const string AppSecret = "APP秘钥";
public static string DoPostForm(string path, T paraModel, bool isTest)
{
var headers = new Dictionary<string, string>();
var querys = new Dictionary<string, string>();
var bodys = new Dictionary<string, string>();
var signHeader = new List<string>();
//设定Content-Type,根据服务器端接受的值来设置
headers.Add(HttpHeader.HTTP_HEADER_CONTENT_TYPE, ContentType.CONTENT_TYPE_JSON);
//设定Accept,根据服务器端接受的值来设置
headers.Add(HttpHeader.HTTP_HEADER_ACCEPT, ContentType.CONTENT
.Net阿里云API网关SDK
最新推荐文章于 2024-03-17 08:02:51 发布
本文介绍如何利用.Net SDK与阿里云API网关进行无缝集成,包括配置、调用API以及错误处理等关键步骤,助力提升后端服务的接入效率。

最低0.47元/天 解锁文章
620

被折叠的 条评论
为什么被折叠?



