Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
ohmyfetch (Nuxt 3 $fetch) how to remove 'text/plain;charset=UTF-8' from content-type header?

I am trying to send a post request to PostgREST to invoke a stored procedure:

  const data = await $fetch('http://http-logger:3001/rpc/test_proc', {
    method: 'post',
    headers: {
      Prefer: 'params=single-object',
      Accept: 'application/json',
      'Content-Type':  'application/json'
    },
    body: {some: 'json'}
})

Results in this request:

POST /rpc/test_proc HTTP/1.1
host: http-logger:3001
connection: keep-alive
prefer: params=single-object
accept: application/json
content-type: application/json, text/plain;charset=UTF-8
accept-language: *
sec-fetch-mode: cors
user-agent: undici
accept-encoding: gzip, deflate
content-length: 15


{"some":"json"}

I need to remove the 'text/plain;charset=UTF-8' part from the content-type. Is this possible? Should it even be there as I have explicitly defined the content-type header? Many thanks Ian

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!