📅  最后修改于: 2022-03-11 15:00:46.458000             🧑  作者: Mango
# 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