C# Code Snippet needs a clear handlers to work.
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- documentation
Research direction
Start from the C# example renderer or template that produces the shown RestClient snippet; the issue does not name a file or test. Update the rendered example to include client.ClearHandlers() on line 2, then verify that the generated C# snippet contains it before the custom headers are added.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Pug
- Stars
- 411
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kong/apiembed
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
change code sampleOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
Similar issues
-
Document the isv:HDFGroup Linux package repositories and signing keyPossibly taken @brtnfld claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
aws-documentation-mcp-server: empty spanning headers shift table column labelsPossibly taken @pradeep-ramola claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
docs
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
open-telemetry/opentelemetry.io#12846 ·
Maintainers usually reply within 1 day
-
Shorten and organize the README around reader tasksPossibly taken @msaad00 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
awslabs/social-messaging-agent-runtime-toolkit#257 ·
Maintainers usually reply within 6 days