mercredi 4 mai 2016

testing an API endpoint with a curl request, GET, with a param

I have an API endpoint that looks like this:

module Api
  class SomeEndpoint < BaseController

    def index
       ...
        params['product_id']],
      ...
      end
    end
end

The route to hit it would be /api/some_endpoint. I also need to send it a params hash. I am trying to just QA this endpoint. How would I send a curl request to it to QA it?

Aucun commentaire:

Enregistrer un commentaire