Skip to content

Content-Type and content-type both are identical#16

Open
Nishchit14 wants to merge 12 commits intotj:masterfrom
firecamp-forks:master
Open

Content-Type and content-type both are identical#16
Nishchit14 wants to merge 12 commits intotj:masterfrom
firecamp-forks:master

Conversation

@Nishchit14
Copy link
Copy Markdown

Content-Type and content-type both are identical and should be considered the same header while parsing them.

For the given snippet

`curl --request POST \
      --url https://jsonplaceholder.typicode.com/posts \
      --header 'content-type: application/json' \
      --data '{ "userId": 1, "id": 1 }'`

current behavior is

{
  method: 'POST',
  header: {
    'content-typee': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  url: 'https://jsonplaceholder.typicode.com/posts',
  body: '{ "userId": 1, "id": 1 }'
}

Expected is

{
  method: 'POST',
  header: { 'content-type': 'application/json' },
  url: 'https://jsonplaceholder.typicode.com/posts',
  body: '{ "userId": 1, "id": 1 }'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant