title: How use id in URL axios post method react?
body: <p>I tried to create an app for management, but in the cycle of my app, I have to use a process for creating a session.</p>
  <p>In that, I create a localization, but afterwards, I need to create a session in that location.</p>
  <p>For that, I need to pass the id of the localization in the post request (api/localisations/{localisation_id}/sessions), but I don't know how to do that.</p>
  <p>When I create a session, I have this:</p>
  <pre><code>AddLocalisations (localisations) {
  axios.request({
    method: 'post',
    url: 'http://127.0.0.1:8000/api/localisations/',
    data: localisations,
  
  }).catch(err =&gt; console.log(err))
  }
  
  onSubmit (event) {
  const newLocalisations = {
    name: this.refs.name.value,
    address: this.refs.address.value,
    phone: this.refs.phone.value,
  
  }
  this.AddLocalisations(newLocalisations)
  event.preventDefault(
    this.props.history.push('/AddSessions'),
  )
  }
  </code></pre>