Sending values to api in clarion 6.3 using post method

Hello everybody.

how can I Send values to api link in clarion 6.3 using post method and receive the return value.

Any ideas are highly appreciated.

Regards

If you’re unable to find a solution, you might consider Sockettools. Not cheap, but does a lotta stuff. https://sockettools.com/

There used to be NetTalk, but it doesn’t support C6.

Thank you. I will check that but I already managed it using other programming languages solution like c# and VB with the RUN command, but I always like to keep all codes in the same language.

thank you again for the advise.

I forgot about Mike’s LibCurl GitHub - mikeduglas/libcurl: libcurl for Clarion

thanks again.
Regards

Hi,

Our wrapper template for the Chilkat comms library (plus lots of other functions) supports C6 and will easily allow you to accomplish your task.

More info and downloadable demos are available on our web site:-
https://noyantis.com/product-category/chilkat/

Thanks,

Andy
noynantis.com

Hi,
this could be my solution as I downloaded the examples related to 6.3 and the were interesting, but frankly use it very well and could not implement it.

my parameters are: (post method)
- url
- user Name
- Password (around 300 characters!)
- A string created from xml file encoded as Base64 (around 20000 characters)

with lots of thanks in advance

this is my code in c# which is working fine:

using RestSharp;
using RestSharp.Authenticators;
using Newtonsoft.Json;

var url = “url”;
var client = new RestClient(url);
var request = new RestRequest(url, Method.Post);
request.AddHeader(“Client-Id”, “Client-Id”);
request.AddHeader(“Secret-Key”, “secretKey”);
//--------------------------------------------------------------------------------
request.AddHeader(“Content-Type”, “application/json”);
request.AddHeader(“Cookie”, “stickounet=4fdb7136e666916d0e373058e9e5c44e|7480c8b0e4ce7933ee164081a50488f1”);

var body = @"{" + "\n" + @"    ""invoice"": ""Encrypted XML Code""" + "\n";
var bodyy = JsonConvert.SerializeObject(body);

request.AddBody(bodyy, "application/json");

RestResponse response = await client.ExecuteAsync(request);
var output = response.Content;  
Console.WriteLine(output);

I have no experience with this class. I do know that @Mike_Duglas sometimes refers people to the faq document(s) in that repo.

Yes. Mike has a lot of feed back about this topic and I tried to gather the notes but I feel that there is something missing from my side as I have no compilation or running issues but still I am not getting any response (although I am getting the response with my c# code for the same parameters).

Thanks

I found the problem . it was the verification issue

regards

Always check DebugView log if you have an issue.

will do that . thanks