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