I need to process status code 202

41 views
Skip to first unread message

Anh Nguyễn Tiến

unread,
Nov 3, 2022, 11:01:33 PM11/3/22
to RestSharp
I have an API that returns an image, but initially calling it only returns the code 202. After a while it returns 200 and the image of the API itself.
Is there a way to handle waiting 202 for 200?
Thanks.

Smitha Poluri

unread,
Nov 3, 2022, 11:18:33 PM11/3/22
to rest...@googlegroups.com
Implement a listener. The listener on receiving a valid request will always send a ok response . After this the request is sent to the actual function that delivers your image next. 


On Nov 3, 2022, at 8:01 PM, Anh Nguyễn Tiến <romcoc...@gmail.com> wrote:

I have an API that returns an image, but initially calling it only returns the code 202. After a while it returns 200 and the image of the API itself.

Is there a way to handle waiting 202 for 200?
Thanks.

--
You received this message because you are subscribed to the Google Groups "RestSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to restsharp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/restsharp/d4cf9ef7-498e-4247-90ae-9c7720d3934en%40googlegroups.com.

Anh Nguyễn Tiến

unread,
Nov 4, 2022, 2:32:35 AM11/4/22
to rest...@googlegroups.com
Thanks very much! I put the api call in a while loop, then it worked.

Vào Th 6, 4 thg 11, 2022 vào lúc 10:18 Smitha Poluri <smitha...@gmail.com> đã viết:


--
Nguyễn Tiến Anh - 037.830.8838
Reply all
Reply to author
Forward
0 new messages