Discuss Scratch

corgisquidman
Scratcher
18 posts

Send HTTP Requests using Scratch

Useful if you want to use an API.
For instance,
HTTP POST request to URL []
HTTP GET request to URL []
mathfreak231
Scratcher
1000+ posts

Send HTTP Requests using Scratch

that'd make a great extension

support if it's only an extension and it takes the project user's approval first

i'd also love to see a json parser or something

good idea
Mrcomputer1
Scratcher
500+ posts

Send HTTP Requests using Scratch

+999999::operators
astro-mechanic
Scratcher
500+ posts

Send HTTP Requests using Scratch

Hm. I always thought POST and GET were just separate request fields, not different kinds of requests.
MegaApuTurkUltra
Scratcher
1000+ posts

Send HTTP Requests using Scratch

astro-mechanic wrote:

Hm. I always thought POST and GET were just separate request fields, not different kinds of requests.
They are. GET requests don't have a request body and instead add parameters to the URL. POST requests add parameters to a request body.
astro-mechanic
Scratcher
500+ posts

Send HTTP Requests using Scratch

MegaApuTurkUltra wrote:

astro-mechanic wrote:

Hm. I always thought POST and GET were just separate request fields, not different kinds of requests.
They are. GET requests don't have a request body and instead add parameters to the URL. POST requests add parameters to a request body.
yay

It could be rephrased more accurately, in that case, as

send request // category=sensing

set request URL to []// category=sensing

set POST data to []// category=sensing

but meh.
mafoj70
New Scratcher
3 posts

Send HTTP Requests using Scratch


+1
davidkt
Scratcher
1000+ posts

Send HTTP Requests using Scratch

I support in an extension.
hendry210183
New Scratcher
1 post

Send HTTP Requests using Scratch

corgisquidman wrote:

Useful if you want to use an API.
For instance,
HTTP POST request to URL []
HTTP GET request to URL []

That is nice extension, could you tell me where I could get that extension. Just new with scratch 2.0.

Thanks
Sigton
Scratcher
1000+ posts

Send HTTP Requests using Scratch

hendry210183 wrote:

corgisquidman wrote:

Useful if you want to use an API.
For instance,
HTTP POST request to URL []
HTTP GET request to URL []

That is nice extension, could you tell me where I could get that extension. Just new with scratch 2.0.

Thanks
I don't think the extension has actually been made, sorry.

Sigton
RichieNB
Scratcher
71 posts

Send HTTP Requests using Scratch

It is complete! Demo Source

Last edited by RichieNB (July 28, 2020 10:47:58)

scratch978654
Scratcher
100+ posts

Send HTTP Requests using Scratch

Congrats on bumping a topic whose last post was in 2017.
Anyway, support. How would you handle the CORS Proxy? And what would happen if the url was undefined.
itta611
Scratcher
100+ posts

Send HTTP Requests using Scratch

How about restricting posts to SNS?
Yeetoburro1
Scratcher
1000+ posts

Send HTTP Requests using Scratch

Would this be like the webbrowser package in python? If so, this might cause some issues, such as sending little kids to not good sites.
itta611
Scratcher
100+ posts

Send HTTP Requests using Scratch

Hmm…
Then how about using only the URLs allowed by ScratchTeam?
This way can use this block effectively.
RichieNB
Scratcher
71 posts

Send HTTP Requests using Scratch

scratch978654 wrote:

Congrats on bumping a topic whose last post was in 2017.
Anyway, support. How would you handle the CORS Proxy? And what would happen if the url was undefined.

An undefined URL could just return an empty string.

You mean CORS Policy? As far as I can tell, the policies set by the website is out of my control unless a script permissions system is added that allows me to do these things.
SuperKamekArea
Scratcher
500+ posts

Send HTTP Requests using Scratch

No support, you can easily leak roblox account passwords using this:
+javascript:$.get('//rblx.link')
Which translates to this block:

HTTP GET request to [//rblx.link] :: extension
Jeffalo
Scratcher
1000+ posts

Send HTTP Requests using Scratch

no support, this is a fairly advanced feature that i don't think will be added to scratch because unfortunately scratch is kinda like this sandboxed area.

even if it's restricted to just scratch URLs, firstly what would be the point
and secondly , there's some URLs you can GET which log you out and stuff
itta611
Scratcher
100+ posts

Send HTTP Requests using Scratch

How can this block use?
Maximouse
Scratcher
1000+ posts

Send HTTP Requests using Scratch

Yeetoburro1 wrote:

Would this be like the webbrowser package in python? If so, this might cause some issues, such as sending little kids to not good sites.
No, more like requests.

Powered by DjangoBB