restify / restify/clients

Not able to set Content-Type with UTF-8 in header

Open
#144 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
58
Forks
35
Avg merge
22h 4m
Merged PRs (30d)
10

Description

Hi, maybe I am doing it wrong, but I am not able to set the CharSet in the headers.

(Needed to send some japanese body)
Usually in postman: Content-Type: application/json; charset=UTF-8

I`ve tried to set the headers :

{ 'Content-Type': 'application/json; charset=UTF-8' }

But it fails. It still send the wrong text.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a Japanese request body and the Content-Type header shown in the report. Inspect the HTTP client’s request-body and header handling to identify where UTF-8 is lost; done means the server receives the Japanese text correctly with the requested content type.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.