Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

call the api from ruby

# httpx2.rb
require "httpx"

response = HTTPX.post("https://jsonplaceholder.typicode.com/posts", :json => {'title' => 'foo', 'body' => 'bar', 'userID' => 1})
puts response.body if response.status == 201
Source by www.twilio.com #
 
PREVIOUS NEXT
Tagged: #call #api #ruby
ADD COMMENT
Topic
Name
1+7 =