title: post reguest '422 Unprocessable Entity' with fast api
body: <p>I have a fast api application, where I want to have a post request.</p>
  <pre><code>from pydantic import BaseModel
  from fastapi import FastAPI
  
  
  class Data(BaseModel):
      num: str
  
  app = FastAPI()
  
  @app.post(&quot;/set/&quot;)
  def set_param(data: Data):
      return data
  
  </code></pre>
  <p>When I send request from another file:</p>
  <pre><code>import requests,json
  
  req = requests.post('http://0.0.0.0:5000/set/',data={'num':'1'}).json()
  
  </code></pre>
  <p>I have an error:</p>
  <pre><code>INFO:     127.0.0.1:54236 - &quot;POST /set/ HTTP/1.1&quot; 422 Unprocessable Entity
  </code></pre>
  <p>I don;t know what should I change to eliminate this error.</p>