login about faq

I want to do a HTTP request asynchronously by using the CkHttp_SynchronousRequestAsync function (C API), but I'm not seeing any way of getting the HTTP response once the async call finishes. How can I do that? The CkHttp_SynchronousRequest function returns a HCkHttpResponse, which I can process, but how can I do it asynchronously?

asked Nov 06 '15 at 11:55

malin's gravatar image


edited Nov 06 '15 at 11:56

After the async call has completed, you can get the result by calling the CkHttpResponse_LoadTaskResult function.

BOOL CkHttpResponse_LoadTaskResult(HCkHttpResponse cHandle, HCkTask task);

Introduced in version

Loads the HTTP response from a completed asynchronous task.

Returns TRUE for success, FALSE for failure.

You would instantiate a new/empty HTTP response object, then load it with the task result, like this:

HCkHttpResponse response = CkHttpResponse_Create();
BOOL success = CkHttpResponse_LoadTaskResult(response, task);

For any asynchronous Chilkat method that returns a Chilkat object (of type T), there will be a corresponding T::LoadTaskResult method. Given that "C" is not object-oriented, it is a function using object handles.


answered Nov 06 '15 at 12:07

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 06 '15 at 11:55

Seen: 453 times

Last updated: Nov 06 '15 at 12:07

powered by OSQA