Hiya,
I see EnqueuePost is being deprecated (thanks for the heads-up), so I don't have to rush through some fixes last minute I thought I'd change my code tonight.
I currently have this in my code:
But I'm not sure how this is changed to accommodate the new syntax as per Wulf's announcement as the Docs haven't yet been updated and the example in the announcement wasn't clear inside my little headCode:webrequest.EnqueuePost(url, payload, (code, response) => ServerDetailsCallback(code, response), this);
Any help updating this line for the new Enqueue syntax greatly appreciated, thanks in advance.
T.
EnqueuePost deprecated in favour of Enqueue
Discussion in 'Rust Development' started by Rebajas, Nov 11, 2017.
-
Wulf Community Admin
-
I did, but my little brain can't comprehend what this means in actual usage:
Code:webrequest.Enqueue(string url, string body, Action<int, string> callback, Plugin owner, RequestMethod method = RequestMethod.GET, Dictionary<string, string> headers = null, float timeout = 0f)
T. -
Wulf Community Admin
-
Thank you sir - additionally, I hope this post will help others when the time finally comes to remove this code completely.
[DOUBLEPOST=1510433684][/DOUBLEPOST]Balls, getting this in the compiler log:
Code:[SERVER v1.0.24] Console: CoreResetLogs.cs(37,255+): error CS0103: The name `RequestMethod' does not exist in the current context CoreResetLogs.cs(52,157): error CS0103: The name `RequestMethod' does not exist in the current context
Code:webrequest.Enqueue(url, payload, (code, response) => ServerDetailsCallback(code, response), this, RequestMethod.POST);
-
Help me, Obi-Wulf Kenobi.
-
Wulf Community Admin
-
Superb, I don't use Visual Studio but I'm sure this thread will save you some answering in future