This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
The Rest - Ask For Help / Re: Problem using Source Procedure Template with NetWebClient to GET API data
« on: January 17, 2020, 04:30:43 PM »
Thanks for the reply, I now understand, I will use the Windows template. So maybe a future new product will be a Capesoft Source template with an Event/Accept loop.<G>
Best Regards
Loren Gregg LaBaw
Best Regards
Loren Gregg LaBaw
2
The Rest - Ask For Help / Problem using Source Procedure Template with NetWebClient to GET API data
« on: January 15, 2020, 11:13:42 AM »
I'm trying to use a Source Procedure Template with NetWebClient to GET API data from a website. In a Window template all is fine but in a source template I must be missing something. NetTalk Twilio example is great but I just can't seen to get the hang of it on a source template. With the code below Log returns empty.
In the Process Code section I have:
net.init()
log = ''
url = 'https://api.bigcommerce.com/stores/' & CLIP(XStore) & '/v2/products/skus?sku=' & CLIP(TSKU)
loc:Message = CLIP(url)
net.CustomHeader = 'x-auth-client:' & CLIP(XClient) & '<13,10>' & 'x-auth-token:' & CLIP(XAuth)
net.contentType = CLIP(XType)
net.SetAccept(CLIP(XAccept))
net.HTTPVersion = CLIP(XVersion)
net.Get(url,'')
net.pagereceived
RETURN(Log)
In PageReceived PROCEDURE, VIRTUAL I have:
log = clip(log) & '<13,10>------<13,10>' & self.ThisPage.GetValue()
and in Send PROCEDURE, VIRTUAL I have:
log = self.packet.bindata
In the Process Code section I have:
net.init()
log = ''
url = 'https://api.bigcommerce.com/stores/' & CLIP(XStore) & '/v2/products/skus?sku=' & CLIP(TSKU)
loc:Message = CLIP(url)
net.CustomHeader = 'x-auth-client:' & CLIP(XClient) & '<13,10>' & 'x-auth-token:' & CLIP(XAuth)
net.contentType = CLIP(XType)
net.SetAccept(CLIP(XAccept))
net.HTTPVersion = CLIP(XVersion)
net.Get(url,'')
net.pagereceived
RETURN(Log)
In PageReceived PROCEDURE, VIRTUAL I have:
log = clip(log) & '<13,10>------<13,10>' & self.ThisPage.GetValue()
and in Send PROCEDURE, VIRTUAL I have:
log = self.packet.bindata
Pages: [1]