Xlinka / NeosPlus

NeosVR Plugin Extra Logix nodes and features
https://discord.gg/9QAaMtXwke
Other
29 stars 19 forks source link

Update HTTPRequest.cs #141

Closed Xlinka closed 11 months ago

Xlinka commented 11 months ago

Updated HTTP NODE to use one HTTP CLIENT instead of instantiating a new one for each pulse

Xlinka commented 11 months ago

@Lexevolution

Lexevolution commented 11 months ago

I couldn't see why #131 was happening, since I was only reusing the CloudXInterface.SafeHTTPClient, which is the same httpClient that's used in the vanilla GET and POST string nodes. But if changing it to its own httpClient fixes the problem, then I guess it's fine.

Xlinka commented 11 months ago

Maybe we should add a neosplus safehttp client for neosplus usage?

Lexevolution commented 11 months ago

The only difference between the regular one and the "safe" one is that the "safe" one has a one minute timeout. Which can just be added by putting

client.Timeout = TimeSpan.FromMinutes(1);

directly after this.

Xlinka commented 11 months ago

Odd

Xlinka commented 11 months ago

merging since it fixes issue will update if anything else arrises