title: Bad request using checkbox with React and Axios
body: <p>I'm having a problem posting a form data with axios (bad request 400). I found out that the error occurs only if a checkbox field is marked. If I don't use the checkboxes, the form post is fine.
  Any ideas how to fix this?</p>
  <p>Here is the field code:</p>
  <pre><code>&lt;Form.Check className=&quot;campo-6&quot; type=&quot;checkbox&quot; label=&quot;Seg&quot; name=&quot;AulaSegunda&quot; onChange={onChange}/&gt;
  </code></pre>
  <p>The oneChange method:</p>
  <pre><code>function onChange(ev) {
      const { name, value } = ev.target;
      setValues({...values, [name]: value});
    }
  </code></pre>
  <p>Axios post and configuration method:</p>
  <pre><code>let axiosConfig = {
      headers: {          
        'Accept': 'application/json',
        'Content-Type': 'application/json'       
      }
    };
  
  async function CadastrarAluno(JsonData){
    console.log(JsonData);
    await axios.post('https://localhost:52446/api/Alunos',JsonData,axiosConfig) 
    console.log(JsonData);
  }
  </code></pre>
  <p>Network console tab after posting,
  <img src="https://i.stack.imgur.com/VJZm4.png" alt="network panel screenshot" /></p>