-测试环境:wordpress 4.9.9 必须安装插件Basic Auth
-测试工具:ARC
-测试目标:修改hello world文章的标题为"happy new year"
-测试步骤:
1.将管理员登录名和密码用以下格式加密:
base64_encode( 'admin' . ':' . '12345' )
假设结果为ABCDEF...==
2.ARC Request Method: post
URL: http://your-wordpress/?rest_route=/wp/v2/posts/1
Headers添加 authoriztion: Basic ABCDEF...==
Body中content type设为appliction/json, Editor view为Raw input,输入
{"title":"happy new year"}
3.点击send按钮提交。查看结果如下: