idk SkHTTP post/get request

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Emmett1027

New Member
Aug 31, 2024
5
0
1
So basicly, I want to try to make skript access pastebin via SkHTTP, then a website access that for like information and stuff. (I'm too lazy to set up a database)

The thing is, I don't know how to use the request stuff...

(this is an example on docs)

send async request using {_client} and {_request}:
broadcast body of the response
send request using {_request}

I'm confused on sending these request, and I am super confused on it....
 
here this should work
Python:
command /test:
    trigger:
        set {_client} to new http client
        set {_request} to new POST request to "https://pastebin.com/api/api_post.php"
        add "Content-Type: application/x-www-form-urlencoded" to headers of {_request}
        set {_body} to "api_dev_key=PASTEBIN_DEV_KEY&api_option=paste&api_paste_code=This+is+a+test+paste!"
        set body of {_request} to {_body}
        send async request using {_client} and {_request}:
            broadcast "Pastebin response: %body of the response%"
I just learned skhttp for this thread so I'm not a master
 
the urls are not the ones you would want to use, they are filler urls.
also this plugin is a good one to use it seems, where as from my perspective you could make a shop online without the need of getting a 3rd party involved
so do some research and test builds of some skripts and hopefully you can figure this out!