title: Axios PUT/PATCH but contains no body
body: <p>I success post a <code>json</code> to backend side. But I am having a problem with <code>patch</code>. I have followed <a href="https://github.com/axios/axios" rel="nofollow noreferrer">docs</a> I also tried <code>axios.patch()</code>. No error <code>PATCH</code> does reaches the Django, but no data.</p>
  
  <p><strong>Quesion:</strong><br>
  Where am I miss?</p>
  
  <pre><code>import axios from "axios/index";
  import {takeEvery, call, put} from "redux-saga/effects";
  import {getAuthToken, prepareJWTHeader} from "../../login/utils";
  import {ROOT_URL, SELECT_COMPANY, SELECT_COMPANY_COMPLETE, SELECT_COMPANY_FAILED} from "../../constants";
  
  const shootSelectedCompany = (companyId) =&gt; {
    const token = getAuthToken();
    const jwt = prepareJWTHeader(token);
    let request = axios.create({
      method: 'PATCH',
      baseURL: `${ROOT_URL}/api/userprofiles/select_company/`,
      headers: {
        Authorization: jwt,
        'Content-Type': 'application/json'
        // Also had tried https://github.com/axios/axios/issues/97
        'Content-Type' : 'application/x-www-form-urlencoded'
      }
      data: {
         selected_company: companyId
      }
      //Also had tried
      //body: {
      //   selected_company: companyId
      //}
    });
    return request.patch(null);
  };
  
  
  function* patchSelectedCompany(action) {
    try {
      const res = yield call(shootSelectedCompany, action.payload);
      yield put({
        type: SELECT_COMPANY_COMPLETE,
        payload: res
      });
    } catch (err) {
      yield put({
        type: SELECT_COMPANY_FAILED,
        payload: err
      });
    }
  }
  
  export function* watchSelectCompany() {
    yield takeEvery(SELECT_COMPANY, patchSelectedCompany)
  }
  </code></pre>
  
  <p><code>package.json</code></p>
  
  <pre><code>{
    "name": "f2",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "axios": "0.17.1",
      "history": "^4.7.2",
      "lodash": "^4.17.4",
      "querystring": "^0.2.0",
      "react": "^16.2.0",
      "react-dom": "^16.2.0",
      "react-redux": "^5.0.6",
      "react-router": "^4.2.0",
      "react-router-dom": "^4.2.2",
      "react-router-redux": "^4.0.8",
      "react-scripts": "^1.0.17",
      "redux": "^3.7.2",
      "redux-form": "^7.2.0",
      "redux-promise": "^0.5.3",
      "redux-saga": "^0.16.0",
      "redux-thunk": "^2.2.0"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test --env=jsdom",
      "eject": "react-scripts eject"
    }
  }
  </code></pre>
  
  <p><code>Django</code></p>
  
  <pre><code>@list_route(methods=['patch'], permission_classes=[IsAuthenticated,])
  def select_company(self, request):
      try:
          profile = UserProfile.objects.get(user=request.user)
          valid_companies = self.request.user.userprofile.companies.all()
          selected_company = Company.objects.get(
              id=request.data.get('selected_company')[0]
          )
          if selected_company in valid_companies:
              profile.selected_company = selected_company
              profile.save()
          else:
              logger.warning(
                  f"{request.user} submits an invalid company_id: {request.data.get('selected_company')[0]}"
              )
              return Response(f'{request.user} submits an invalid companyID. Your action has been log!',
                              status=status.HTTP_409_CONFLICT)
      except TypeError:
          return Response({'detail': f'{request.user} submit a blank company'}, status=status.HTTP_400_BAD_REQUEST);
      except Company.DoesNotExist:
          # request.user PATCH with non exist company_id
          return Response({'detail': f'{request.user} select an invalid company'}, status=status.HTTP_406_NOT_ACCEPTABLE)
      except UserProfile.DoesNotExist:
          return Response({'detail': f'{request.user} has no userprofile'}, status=status.HTTP_404_NOT_FOUND)
      return Response({"detail": f'{profile.selected_company.name} has been selected'}, status=status.HTTP_202_ACCEPTED)
  </code></pre>
  
  <p><strong>FYI:</strong><br>
  I have put <code>pdb</code> in the <code>TypeError</code>. Here is an evidence.</p>
  
  <pre><code>(Pdb) request.data
  {}
  </code></pre>
  
  <p><code>requirements.txt</code></p>
  
  <pre><code>djangorestframework==3.7.3
  django==1.11.7
  </code></pre>