Bartender REST via Application Studio

I feel like I stumbled on something @GabeFranco posted on how to send a request to a bartender web integration but I can’t find it again, but in general I am struggling because I see a message from Kinetic on function save that

‘HttpClient.Send(HttpRequestMessage)’ is only supported on: ‘Windows’.

As well as other messages… so is there some rest widget for events on app studio that can send a POST to an endpoint without getting those compatibility warnings?

Not sure where to go and what the appropriate and “future proof” way of doing this is…

RestSharp should be available to add as a reference in a function, have you tried that route?

1 Like

Thanks Evan, appreciate it, I’ll go that way and see what’s up.

I think both the bartender API and RESTSharp API are public so this is something AI might be able to accelerate your progress on.

2 Likes

Thanks, you’re saying I can just reference it natively in a C# widget on a function?

No, you have to add a reference to it

1 Like

Okay, cool, I’ll do that.

1 Like

You seeing that pop up natively or is that a custom DLL you added?

I and others should have some examples with RestSharp on here.

Evan and I are both cloud, no custom dlls.

It’s included from Epicor.

1 Like

Thanks Kevin, been a minute since I have developed in Kinetic… been primarily doing business process mapping, analysis, implementing standard workflows again after many years of doing things outside the system or with no process.

If you don’t have the home brew bpm patch the reference dialog takes 999999999 years to populate

2 Likes

Man, it’s not popping up for me when I search the assemblies. 2024.2 on prem.

okay I’ll wait a little longer.

1 Like

lol @klincecum and @Evan_Purdy I knew it always took time to load them (even in 10.2)… finally popped up.

1 Like

I always just search for “kiss @josecgomez

3 Likes

My question for y’all is though, when you’re doing this server side, instead of from a client cause it’s in a function, you enforcing timeouts on this stuff? What are you doing to keep these rest calls from impacting everyone else if they hang, etc.?

You can certainly hose the server if you make a bad enough function, but I believe they are run async on a different thread - I haven’t noticed long running rest calls hanging the server for anyone.

Any of the wizards that have access to on prem server and decompiler could probably give a much more technical response to that

1 Like

Thanks man.

They aren’t async, but they won’t hang the server for everyone.

Unless you do something really dumb… which I have :rofl:

Only when I’ve had problems, most of the time I don’t bother.

2 Likes