[Vala] problem with gnet ConnHttpEventResponse



hello,
I am trying to retrieve the header_fields and header_values fields
from a GNet.ConnHttpEventResponse and I don't know how to extract the
data. The valdoc page
http://valadoc.org/?path=gnet-2.0::GNet::ConnHttpEventResponse states
that header_fields and header_values are weak string, but the GNet
documentation http://www.gnetlibrary.org/docs/gnet-conn-http.html
states that the fields are null terminating arrays of strings.

Using the function:
        private void get_response_data(ConnHttpEventResponse resp)
        {
                uint response_code;
                weak string header_fields;
                weak string header_values;

                //get the data from the structure
                response_code = resp.response_code;
                header_fields = resp.header_fields;
                header_values = resp.header_values;
                stdout.printf("response code:%.0f\n",response_code);
                //how does the data in the header_fields get iterated?
        }
I can get the data from the fields as a string but I want to get the
data as a string[] so that I can iterate over the data. Does anyone
have any suggestions?

Thanks for your time,
Jezra



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]