>  but I wonder how to make using the synapse without using another library

This your code is bad:

   lPostData :=TStringList.Create;
   lPostData.Add(EncodeURL('grant_type=client_credentials'));
   lPostData.Add(EncodeURL('scope=product:show stock:save 
stock:update warehouse:list warehouse:save warehouse:show 
warehouse:update'));
   lPostData.Add(EncodeURL('client_id='+clientid));
   lPostData.Add(EncodeURL('client_secret='+clientsecret));
   WriteStrToStream(ht.Document, EncodeURL(lPostData.Text));

Too many bad encodings. ;-)

Try this instead:

s := 'grant_type=' + EncodeURLElement('client_credentials') +
'&scope=' + EncodeURLElement('product:show stock:save stock:update 
warehouse:list warehouse:save warehouse:show warehouse:update') +
'&client_id=' + EncodeURLElement(clientid) +
'&client_secret=' + EncodeURLElement(clientsecret);
WriteStrToStream(ht.Document, s);



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to