LoginSignup
1
1

More than 1 year has passed since last update.

R の http クライアントの使い方 (Post)

Last updated at Posted at 2018-03-07

次のページを参考にしました。
httr quickstart guide

http_post.R
# ---------------------------------------------------------
#	http_post.R
#
#				Mar/07/2018
#
# ---------------------------------------------------------
write("*** 開始 ***", stderr())
library (httr)
rr <- POST("https://httpbin.org/post", body = list(user = "jiro", password="123456"))
print ("---------------------")
http_status(rr)
print ("---------------------")
str(content(rr))
print ("---------------------")
rr
write("*** 終了 ***", stderr())
# ---------------------------------------------------------

実行コマンド

Rscript --no-restore --no-save http_post.R

次のバージョンで確認しました。

$ Rscript --version
Rscript (R) version 4.2.1 (2022-06-23)

Get の例はこちら
R の http クライアントの使い方 (Get)

1
1
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
1
1