Https request to Random.org

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Https request to Random.org

Long Haired David
Hi everyone. I need to get some random numbers and the best way seems to be Random.org. Now, if they accepted http, I would be OK but their  api only accepts https. This is the url

https://www.random.org/integers/?num=55&min=1&max=55&col=55&base=10&format=plain&rnd=new

This api will give me my 55 random numbers but I can only seem to generate http requests. Is there a way to do an https get using Seaside?

I am on VA Smalltalk V 9.1.


Message sent using Winmail Mail Server

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Https request to Random.org

Karsten Kusche
Hi David,

Seaside is only a Server framework. Depending on the underlying http server it might be capable of handling incoming https requests, but that’s nothing that is handled by seaside itself. 
If you want to do outgoing https requests though that’s nothing seaside might be able to help you with. 

Kind regards
Karsten



Georg Heeg eK
Wallstraße 22
06366 Köthen

Tel.: 03496/214328
FAX: 03496/214712
Amtsgericht Dortmund HRA 12812


Am 26. Juni 2019 um 21:56:53 MESZ schrieb David Pennington <[hidden email]>:
Hi everyone. I need to get some random numbers and the best way seems to be Random.org. Now, if they accepted http, I would be OK but their  api only accepts https. This is the url

https://www.random.org/integers/?num=55&min=1&max=55&col=55&base=10&format=plain&rnd=new
This api will give me my 55 random numbers but I can only seem to generate http requests. Is there a way to do an https get using Seaside?

I am on VA Smalltalk V 9.1.


Message sent using Winmail Mail Server
<ATT00001.txt>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Https request to Random.org

Paul DeBruicker
In reply to this post by Long Haired David
Do you need random numbers in you image? Or the browser?

If in your image does this video help:
http://www.jarober.com/blog/blogView?entry=3526889741



If in the browser this javascript will give you a random number between 0
and 1000 every time its called:

 Math.floor(1000 * Math.random());

Math.random() will give you a random float you can scale to whatever integer
you want.





Long Haired David wrote

> Hi everyone. I need to get some random numbers and the best way seems to
> be Random.org. Now, if they accepted http, I would be OK but their  api
> only accepts https. This is the url
> https://www.random.org/integers/?num=55&min=1&max=55&col=55&base=10&format=plain&rnd=new
> This api will give me my 55 random numbers but I can only seem to generate
> http requests. Is there a way to do an https get using Seaside?
> I am on VA Smalltalk V 9.1.
>
> Message sent using Winmail Mail Server
>
> _______________________________________________
> seaside mailing list

> seaside@.squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Https request to Random.org

Tim Mackinnon
In reply to this post by Long Haired David
Hi David - if you need to generate some random numbers from your seaside app, I’m sure there must be a Random class in VA that you can see on startup and then just generate random number from it?

In Pharo its: Random new next: 20

If you are convinced you want to use that service, again I’m sure there must be an https library in VA? In Pharo I would use:


I think there might be a port of Zinc to VA - but possibly there is something built in already.

Tim

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside