cancel
Showing results for 
Search instead for 
Did you mean: 

Create an async method that receive a callback function

New Contributor

Create an async method that receive a callback function

Hi,

 

I'm developing a yml openapi definition that will generate a client to interact with an already created API. This API has asynchronous functions that return "delayed" content, and the HTTP connection should be opened until a timeout, lets put the example that each two seconds return a json object that should be processed on the client.

 

So, I would like that the openapi generated client can get a callback function that the USER pass to the generated library, that process this "delayed" response in a separated thread or similar. Looking to the documentation I think that the callbacks are not defined for this purpose.

 

Is possible to do that with openapi?

 

Thanks in advance!

 

 

Tags (1)
1 REPLY 1
New Contributor

Re: Create an async method that receive a callback function

Oh i see, with the python generator it supports that each call to the endpoint could be called as async, and it returns a thread

New Here?
Join us and watch the welcome video: