Jump to content
bigdessert

HTTP-GET-POST plugin

Recommended Posts

Posted (edited)

I am breaking out this plugin to a separate thread for update tracking.

Please try to donate if you can - DONATE HERE

I created this plugin out of the want to not have to make all these requests with powershell and be able to perform GET/POST requests to services. The requests run from the Automate server so make sure your web access is there.

Most all fields are pretty self explanatory except for the GETCOOKIE and POSTCOOKIE. Those methods are the exact same as GET and POST except for the fetch and save the cookies presented during the request to a user variable @HTTPPlugin_cookies@. This user variable will only live during the script session so you can save it out(base64 encoded) if needed. You could also base64 encode your own cookie data and present it as a cookie for a post. You can then perform normal GET/POST operations and the cookie data will be sent.

This plugin will also return the following user variables

@HTTPPlugin_returnstatus@ = http status code from the request
@HTTPPlugin_returnheaders@ = headers returned from the request

You can now perform authentication on the request by setting the following variables before the request:

@HTTPPlugin_auth@ = either "basic" or "digest"
@HTTPPlugin_user@ = username
@HTTPPlugin_pass@ = password

image.thumb.png.da2c20692cb31b42ef49fe1cf7a3389a.png

Changelog

Version 1.0.0.1 Initial Release

Version 1.0.0.2 Updated HTTP-GET-POST plugin to also have GETCOOKIE and POSTCOOKIE methods

Version 1.0.0.3 Updated so cookie is stored in user variable @HTTPPlugin_cookies@ and also added ability for authentication digest or basic. Added response headers and status code.

 

 

HTTP-GET-POST.zip

Edited by bigdessert
  • Like 1

Share this post


Link to post
Share on other sites

Can you add support for authentication? 😀

From your explanation above, it sounded like once you called the GetCookie/PostCookie methods that subsequent Get/Post method calls would use the cookie data. Are they only sent when the "Cookie" methods are used? Is there a "Clear Cookie" function? Or do cookies only persist for the script session?

Share this post


Link to post
Share on other sites
6 hours ago, DarrenWhite99 said:

Can you add support for authentication? 😀

From your explanation above, it sounded like once you called the GetCookie/PostCookie methods that subsequent Get/Post method calls would use the cookie data. Are they only sent when the "Cookie" methods are used? Is there a "Clear Cookie" function? Or do cookies only persist for the script session?

You are right the cookie lasts indefinitely with no clear option. I will add a clearcookie method so you can clear it. What kind of authentication you looking for?

Share this post


Link to post
Share on other sites

Updated to 1.0.0.3 to have cookies stored in a user variable during the script life only and also added basic and digest authentication ability.

Share this post


Link to post
Share on other sites

Hey BiggyD, is there any chance you can offer the source for this so it can be extended upon?  We'd like the ability to set custom headers, and tweak other request parameters, etc and would like to help extend your plugin - we have a lot of possible use cases for this.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×