title: How can I make a HTTP request from one docker container to another linked container?
body: <p>I have a docker container with an sinatra app inside, and another container with an node.js app. They are both linked through Fig. In my sinatra app I am making a HTTP Post request to the node.js app. For that I am using the Faraday gem. </p>
  
  <p>My questions is now how can I make a HTTP request to another linked container.</p>
  
  <p>Here's my fig.yml</p>
  
  <pre><code>db:
    image: mongo:2.6.7
    command: --smallfiles
  
  api:
    build: ./api
    command: bundle exec rackup -p 3000
    volumes:
      - ./api:/code
    ports:
      - "3000:3000"
    links:
        - db
        - flickrcrawler
  
  flickrcrawler:
    build: ./flickr-crawler
    ports:
      - "3100:3100"
    links:
      - db
  </code></pre>
  
  <p>and here's the method in the sinatra app I use to make a HTTP request with farady:</p>
  
  <pre><code>def crawler_call(url, tags)
    tags.each do |t|
      conn = Faraday.new(url: url) do |faraday|
        faraday.request :url_encoded
        faraday.response :logger
        faraday.adapter Faraday.default_adapter
      end
  
      conn.post "#{t}"
    end
  end
  </code></pre>
  
  <p>what would I pass this method as url parameter?</p>