Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 7:46 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 7:57 am 
Offline

Joined: April 13th, 2010, 5:00 pm
Posts: 19
Opus: 9.75
OS: Windows 11
System: DELL
Hello everyone
I have a problem
I want to call the data page and I can do it in GET format
An example that works:
I have a button that runs the script:

LaunchURL ("https://ssl.dotpay.pl/t2/?id=12345&channel_groups=K,T,P&p_info=AtakSport&amount=321,00&description=bla bla bla")

The problem is that the data is visible and can be changed.
How do you convert this script from GET to POST?

Please help


Top
 Profile  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 8:21 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
That's the wrong function.

You need the function - InternetPostData.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 9:54 am 
Offline

Joined: April 13th, 2010, 5:00 pm
Posts: 19
Opus: 9.75
OS: Windows 11
System: DELL
I tried, but without success
File attached


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 12:11 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Sorry, haven't been set-up to handle this sort of problem for a long time - it's all browser debugging for web applications now.

I can from memory tell you, your code is wrong - Opus requires that you do not use HTTPS but instead set the parameter in the function:

Code:
var url = "http://ssl.dotpay.pl/t2/"

var obj = new Object()
obj.id = 12345
obj.description = "bla bla bla"
obj.amount = "325,00"
out = InternetPostData(url, obj, true,true) //second 'true' sets SSL


I can also see that out returns part of a web page - but without the right tools that's about it.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 4:42 pm 
Offline

Joined: April 13th, 2010, 5:00 pm
Posts: 19
Opus: 9.75
OS: Windows 11
System: DELL
Does not work, does not start the browser.
I guess I'll have to stay with GET.

LaunchURL("https://ssl.dotpay.pl/t2/?id=123456&amount=321,00&description=bla bla bla")

This script works fine but is imperfect

Thank you very much for help


Top
 Profile  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 6:35 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I think you misunderstand. InternetPostData and InternetGetData are Ajax requests that are used to send and retrieve information from a server.

They happen in the background - they do not launch windows.

Your LaunchURL is used to open a window / tab whether it's a simple URL such as http://www.google.co.uk or a URL with a querystring such as yours.

Sending information with Ajax is two way communication (encrypted) and a launch / open window is one way communication.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: January 13th, 2020, 10:21 pm 
Offline

Joined: April 13th, 2010, 5:00 pm
Posts: 19
Opus: 9.75
OS: Windows 11
System: DELL
That's why I asked
Can the LaunchURL () function be changed so that the address can be masked so that the data cannot be changed


Top
 Profile  
 
 Post subject: Re: How do I convert a script from GET to POST?
PostPosted: December 2nd, 2023, 5:24 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
mackavi wrote:
I can from memory tell you, your code is wrong - Opus requires that you do not use HTTPS but instead set the parameter in the function


Great thanks Mac, that was something that was bugging me, but still getting an issue. Ugh seems to only occur since I started using https on the server, even with the flag set as true.

So URL is http://, even though on server it is https:// but setting the flag to be true.

OutputCloud = InternetPostData(URL_Time, obj, false, true);

OutputCloud when I Debug trace it comes up blank.

Thanks, Luke

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group