title: Is there a curl command to do an inline hosts file replacement for that command?
body: <p>I'm testing a service-discovery tool, and I'd like to test dns entries that will point to it before I set them up. </p>
  
  <p>Ordinarily I'd do that by:</p>
  
  <ol>
  <li>adding them to the <code>hosts</code> file, </li>
  <li>running the <code>curl</code> command, and then </li>
  <li>removing them from the <code>hosts</code> file. </li>
  </ol>
  
  <p>The thought occurs I should be able to do this inline with <code>curl</code>. </p>
  
  <p>My question is: <strong>Is there a <code>curl</code> command to do an inline hosts file replacement for that command?</strong></p>
  
  <p>EDIT:
  I believe this is not a duplicate of <a href="https://stackoverflow.com/questions/3390549/set-curl-to-use-local-virtual-hosts?rq=1">this</a> or <a href="https://stackoverflow.com/questions/3390549/set-curl-to-use-local-virtual-hosts/10218482#10218482">this</a> as I'm asking a different question that happens to have the same answer. </p>