使用 C#、.Net 4,5、RestSharp v4.0.3
尝试在 GoCardless 中创建 api_key
我像这样创建一个 RestClient :
var client = new RestClient();
client.BaseUrl = SandboxBaseUrl;
client.Authenticator = new HttpBasicAuthenticator(apiKeyId, apiKey);
client.AddDefaultHeader("GoCardless-Version", Properties.Settings.Default.GoCardlessVersion);
client.AddDefaultHeader("Accept", "application/json");
client.AddDefaultHeader("content-type", "application/json");
request.AddHeader("content-type", "application/json");
当我发布到 GoCardless 时出现错误
{"error":{"message":"'Content-Type' header must be application/json or application/vnd.api+json ......