C# Code Snippet needs a clear handlers to work.
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- csharp
调研方向
从生成所示 RestClient 代码片段的 C# 示例渲染器或模板入手;issue 未指明文件或测试。更新渲染后的示例,使其在第 2 行包含 client.ClearHandlers(),然后验证生成的 C# 代码片段在添加自定义标头之前包含该内容。
由索引模型根据 Issue 内容生成。
描述
Our API requires that customers send vnd mime types in both the Accept and Content-Type headers.
With the C# example, the following code is provided:
var client = new RestClient("https://api.whispir.com/messages?apikey=REPLACE_ME");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/vnd.whispir.message-v1+json");
request.AddHeader("accept", "application/vnd.whispir.message-v1+json");
request.AddHeader("authorization", "<REPLACE_ME>");
request.AddParameter("application/vnd.whispir.message-v1+json", "{\"to\":\"<REPLACE_ME>\",\"subject\":\"<REPLACE_ME>\",\"body\":\"<REPLACE_ME>\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
The problem though is that the request.AddHeader method is not respected unless the following code is provided on line 2:
client.ClearHandlers();
This code clears the default handlers allowing the user to set custom headers.
Can you please include this in your out of the box rendering of C# code.
- 主要语言
- Pug
- 星标
- 411
- 派生
- 52
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Kong/apiembed 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 20/100
相似的 Issue
-
marketing
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
CivicTechWR/accessible-housing-portal#636 ·
维护者通常 1 天内回复
-
Document the isv:HDFGroup Linux package repositories and signing key可能已有人在做 @brtnfld 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
documentation factory:ready
难度 2/5 1-3 小时 新手友好度 72/100