kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
144 stars 46 forks source link

How can I solve this Error...? #50

Closed minerba closed 3 years ago

minerba commented 3 years ago

Hi, @ityuhui As you said I tried to update hpa using generic client.

But generic Make Path function does not include Header par.

How about add Header Parameters in generic Make Path function?

ityuhui commented 3 years ago

The generic client does not have a build-in function to add the header parameters.

For now, you need add them by yourself, please refer to the code in apiClient.c

void apiClient_invoke(...,
                                    list_t        *headerParameters,
                                    ...)
...
        curl_slist_append(headers, headerValueToWrite);
...
        curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
...

Thank you for reporting this problem, I will implement this function to add header parameter to generic function sometimes later.

And welcome you to implement this feature too !