rest - Delphi OAuth 1.0a “单腿”身份验证
问题描述
我想知道是否有人知道如何在delphi中提出这种类型的请求,我已经在互联网上查看了很多关于如何做到这一点的信息,但我找不到任何东西,托运人的本机组件无法使用这种要求!
有人来帮忙!!!!!!
OAuth1Authenticator1.ConsumerKey := ConsumerKey;
OAuth1Authenticator1.ConsumerSecret := ConsumerSecret;
OAuth1Authenticator1.SigningClassName := 'TOAuth1SignatureMethod_HMAC_SHA1';
RESTClient1.Authenticator := OAuth1Authenticator1;
RESTClient1.BaseURL := 'http://myUrl/wp-json/wc/v3';
RESTRequest1.Resource := 'orders';
RESTRequest1.Method := TRESTRequestMethod.rmGET;
RESTRequest1.Execute;
if assigned(RESTResponse1.JSONValue) then
begin
Memo1.Lines.Text := TJson.Format(RESTResponse1.JSONValue)
end
else
begin
Memo1.Lines.Add(RESTResponse1.Content);
end;
解决方案
推荐阅读
- java - 当我尝试发送要在检票口网页上显示的消息时无法打开 IWebSocketConnection
- c# - 无法读取asp.net核心中请求的所有cookie
- javascript - Salesforce LWC - 在数据列表元素上使用 querySelector 时出现错误消息
- google-sheets - 如何在Google表格中找到另一行中有数字的行的总和
- python - scrapy 已安装但无法导入
- apache-spark - read parquet 时 read.partitions optin 有什么用
- javascript - React(next.js) 给我“handleSubmit 未定义”
- ios - 为什么我不能将字典中的值附加到 iOS 中的数组?
- javascript - Angular Firebase Reachig 项目的子数组
- html - 使用纯 CSS 在单击时创建多级下拉菜单