LoginSignup
2
0

More than 5 years have passed since last update.

rubyでXML-RPCリクエストのスクリプトを書く方法

Posted at

クライアントからXMLを送ってサーバーのAPIを叩くスクリプト

sample.rb
require 'xmlrpc/client'

client = XMLRPC::Client.new2('APIのURL')
param = {'カラム名1' => '値', 'カラム名2' => '値', 'カラム名3' => '値'}

client.call('メソッド名', param)

主にサーバー側のデータを書き換えるために使う。
新たにgemのインストールは不要。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0