- Wang Tom
- PowerBuilder
- Tuesday, 17 October 2023 06:16 AM UTC
Hello ,
I have a request to call web api to post data, here are some of the information of that web api:
accept Http post
app_key = 'app_key'
method = 'testMethod'
URL='http://abc.com/inbond'
The 'testMethod' accepts data recrods from my PB program - a header table and it's details, the class definition like below:
testMethod
public class Inbound
{
pubic string MsgID {get;set;}='' ;
public string plandate {get;set;} = '' ;
public list<inbound.DetailItem>PlanDetail = new List<inbound.DetailItem>();
#region DetailItem class
public class DetailItem
{
public int32 LineNo {get;set;} = 0 ;
public string InvoiceNo {get;set;} = '' ;
public string Goodsno {get;set;} = ''
}
#endregion
}
So, i will have post the one header record and multiple detailed record to the testMethod with JSON format. So, how to do this in general? Using the httpclient or RESTclient ?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.