Using Rest API
Ibrahim Bashir
12-17-22
Operating system: Windows
Hello,

I have 2 SERP systems and want to exchange data between them using REST API with basic authentication.

for this I uses SendWebRequest, the function returns TRUE but the blank reply area.

I guess I have a problem passing the username and password, when I pass them like username:password@hostname:port/api... , the SendWebRequest returns FALSE.

here is the code

server = "127.0.0.1";
res = SendWebRequest(server,8033,-1,false,"GET",path,"application/xml","",false,a_req,a_reply,20);
returns true with blank a_reply

server = "SJ:Sample99@127.0.0.1";
res = SendWebRequest(server,8033,-1,false,"GET",path,"application/xml","",false,a_req,a_reply,20);
returns false

when I use the Rest API url in web browser it shows data.

any help?

//IBR 2022-12-17

Paul Timms
12-19-22
What have you set the variable "path" to?


Paul
Ibrahim Bashir
12-20-22
Created byPaul Timms17:01 19 Dec 2022
What have you set the variable "path" to? Paul
Hi Paul,

it is

path = "/api/1/ObjVc";

//IBR
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Lilian Wanyoike
Hi, Spinners & Spinners are currently on version 8.5 2022-02-02 (build 85420830). they have been experiencing a network lag. Action taken: - Checked logs and confirmed that they had not whiteli...
14:13 30 Aug 2024
Lilian Wanyoike
Hi, Spinners & Spinners are currently on version 8.5 2022-02-02 (build 85420830). they have been experiencing a network lag. Action taken: - Checked logs and confirmed that they had not whiteli...
14:13 30 Aug 2024