admin管理员组文章数量:1130349
I am new to WordPress and I'm trying to make a POST request to login a user. I want to be able to send "username" and "password" as params while making this call. How can I do so. This my code so far
register_rest_route(
'custom-plugin', '/login/(?P<username>\d/(?P<password>\d)',
array(
'methods' => 'POST',
'callback' => 'login_user',
));
I am new to WordPress and I'm trying to make a POST request to login a user. I want to be able to send "username" and "password" as params while making this call. How can I do so. This my code so far
register_rest_route(
'custom-plugin', '/login/(?P<username>\d/(?P<password>\d)',
array(
'methods' => 'POST',
'callback' => 'login_user',
));
本文标签: phpHow do I send a POST request with params with WordPress REST API
版权声明:本文标题:php - How do I send a POST request with params with WordPress REST API 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749143193a2322555.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论