0

I have curl str

 curl -L –user '61332:Ne5re3w34fa' -H «Content-Type: application/json» -d '{«confirmed_at»: {«date»:«2014-04-30», «period»: 30}, «merchant_id»:73, «state»:[3,4], «type»: 0, «sub_id»:«test»}' -X POST https://myurl/

which returns me data in console

But how to use it inside rails app?

Katya
  • 138
  • 10
  • possible duplicate of [Calling Bash Commands From Ruby](http://stackoverflow.com/questions/2232/calling-bash-commands-from-ruby) – Roman Kiselenko Nov 26 '14 at 15:57

1 Answers1

0

Ruby stdlib has opportunity to run system commands

Here is good review of all possible variants: Calling shell commands from Ruby

Also there is curl gem: https://rubygems.org/gems/curb

Community
  • 1
  • 1
Stanislav Mekhonoshin
  • 4,276
  • 2
  • 20
  • 25