SkriptWebAPI

Addon SkriptWebAPI Version 0.1.2

  • 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!

What's Changed
* Fix: java.io.IOException: too many bytes to write to stream error by faketuna in https://github.com/faketunaPrivateCamp/SkriptWebAPI/pull/15
* Add get remote IP expression in HTTP server by faketuna in https://github.com/faketunaPrivateCamp/SkriptWebAPI/pull/16

New expression doc is here

Full Changelog: https://github.com/faketunaPrivateCamp/SkriptWebAPI/compare/0.1.1...v0.1.2
Fix HTTP Server context path didn't set correctly #11

Caution​

This version only supports Skript 2.7.3 or higher and Minecraft version 1.13 or higher.

I will only provide official support if Skript is 2.7.3 or higher and Minecraft version 1.20.2 or higher.

Whats new​

New syntax
Now able to send PATCH and any custom request method
Fixed plugin wont load due to package rename.
This update contains hotfix for fissue (#5 in GitHub)

Fixed:
`event-connection's body` don't returns value in after 2nd excecution (#5 in GitHub)
What added
Add async web request feature.

Syntax
Added:
event-value
  • event-connection
event
  • [on] [skeb] get [web] [request] response
  • [on] [skeb] put [web] [request] response
  • [on] [skeb] post [web] [request] response
  • [on] [skeb] delete [web] [request] response
effect
  • [skeb] send get [web] request to %string% [[(with|and)] header %header%] [[(with|and)] body %string%]
  • [skeb] send put [web] request to %string% [[(with|and)] header %header%] [[(with|and)] body %string%]
  • [skeb] send post [web] request to %string% [[(with|and)] header %header%] [[(with|and)] body %string%]
  • [skeb] send delete [web] request to %string% [[(with|and)] header %header%] [[(with|and)] body %string%]
This update have breaking changes in syntax.

What changed
Changed internal code.
Changed Syntax more than half.

What removed
Some Syntax has removed.

Syntax
Removed:
  • any parsed as text is no longer available.
  • event-body
  • event-header
  • event-[user]agent
  • event-[sender]address
  • event-[context]path
Changed:
  • response of delete request is no longer returns %string%. now returns %httpurlcon%
  • response of put request is no longer returns %string%. now returns %httpurlcon%
  • response of post request is no longer returns %string%. now returns %httpurlcon%
  • response of get request is no longer returns %string%. now returns %httpurlcon%
Added:
For event processing
  • %httpexchange%['s] request header properties %string%
  • %httpexchange%['s] body
  • %httpexchange%['s] [context][-]path
  • %httpexchange%['s] [target][-]host
  • %httpexchange%['s] [user][-]agent
For web request
  • %httpurlcon%['s] response body
  • %httpurlcon%['s] response code
  • %httpurlcon%['s] response header [(properties|prop)] %string%