title: 400 Error despite working in Postman, possible reasons?
body: <p>I am using the Deepl API, and when I run the request in Postman it is successful, however using it in my app it returns only a 400 Error, which I assume means the headers aren't set up correctly, but it is just how it is in my Postman. Can anyone point out what may be the issue here?</p>
  <pre><code>async translateMessage(data = {}) {
    const url = &quot;https://api.deepl.com/v2/translate?auth_key=myAuthKey&quot;;
    const response = await fetch(url, {
      method: &quot;POST&quot;,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Accept': '*/*'
      },
      body: {
        text: JSON.stringify(this.text),
        target_lang: 'DE',
        source_lang: 'EN'
      }
    });
    return response.json();
  },
  </code></pre>
  <p><a href="https://www.deepl.com/docs-api/translating-text/request/" rel="nofollow noreferrer">Example HTTP Post Request from Documentation:</a></p>
  <pre class="lang-none prettyprint-override"><code>POST /v2/translate?auth_key=[yourAuthKey]&gt; HTTP/1.0
  Host: api.deepl.com
  User-Agent: YourApp
  Accept: */*
  Content-Length: [length]
  Content-Type: application/x-www-form-urlencoded
  
  auth_key=[yourAuthKey]&amp;text=Hello, world&amp;source_lang=EN&amp;target_lang=DE
  </code></pre>