dist/gen/api/coreV1Api.js
/**
     * connect POST requests to proxy of Service
     * @param name name of the ServiceProxyOptions
     * @param namespace object name and auth scope, such as for teams and projects
     * @param path path to the resource
     * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q&#x3D;user:kimchy. Path is _search?q&#x3D;user:kimchy.
     */
connect POST requests to proxy of Service
@param name name of the ServiceProxyOptions
@param namespace object name and auth scope, such as for teams and projects
@param path path to the resource
@param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service.
connect POST requests to proxy of Service @param name name of the ServiceProxyOptions @param namespace object name and auth scope such as for teams and projects @param path path to the resource @param path2 Path is the part of URLs that include service endpoints suffixes and parameters to use for the current proxy request to service .
connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
                .replace('{' + 'name' + '}', encodeURIComponent(String(name)))
                .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
                .replace('{' + 'path' + '}', encodeURIComponent(String(path)));
            let localVarQueryParameters = {};
            let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
            let localVarFormParams = {};
            if (name === null || name === undefined) {
                throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
            }
            if (namespace === null || namespace === undefined) {
                throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
            }
            if (path === null || path === undefined) {
                throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
            }
            if (path2 !== undefined) {
                localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
            }
            Object.assign(localVarHeaderParams, options.headers);
            let localVarUseFormData = false;
            let localVarRequestOptions = {
                method: 'POST',
                qs: localVarQueryParameters,
                headers: localVarHeaderParams,
                uri: localVarPath,
                useQuerystring: this._useQuerystring,
                json: true,
            };
            this.authentications.BearerToken.applyToRequest(localVarRequestOptions);
            this.authentications.default.applyToRequest(localVarRequestOptions);
            if (Object.keys(localVarFormParams).length) {
                if (localVarUseFormData) {
                    localVarRequestOptions.formData = localVarFormParams;
                }
                else {
                    localVarRequestOptions.form = localVarFormParams;
                }
            }
            return new Promise((resolve, reject) => {
                localVarRequest(localVarRequestOptions, (error, response, body) => {
                    if (error) {
                        reject(error);
                    }
                    else {
                        body = models_1.ObjectSerializer.deserialize(body, "string");
                        if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
                            resolve({ response: response, body: body });
                        }
                        else {
                            reject({ response: response, body: body });
                        }
                    }
                });
            });
        });
    }
connectPostNamespacedServiceProxyWithPath ( name , namespace , path , path2 , options = { headers : { } } ) { return tslib_1 . __awaiter ( this , void 0 , void 0 , function * ( ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = Object . assign ( { } , this . defaultHeaders ) ; let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = models_1 . ObjectSerializer . serialize ( path2 , "string" ) ; } Object . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ; this . authentications . default . applyToRequest ( localVarRequestOptions ) ; if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { localVarRequestOptions . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { body = models_1 . ObjectSerializer . deserialize ( body , "string" ) ; if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { resolve ( { response : response , body : body } ) ; } else { reject ( { response : response , body : body } ) ; } } } ) ; } ) ; } ) ; }
connect POST requests to proxy of Service
 @param name name of the ServiceProxyOptions
 @param namespace object name and auth scope, such as for teams and projects
 @param path path to the resource
 @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service.
connect POST requests to proxy of Service @param name name of the ServiceProxyOptions @param namespace object name and auth scope such as for teams and projects @param path path to the resource @param path2 Path is the part of URLs that include service endpoints suffixes and parameters to use for the current proxy request to service .
// verify required parameter 'name' is not null or undefined // verify required parameter 'namespace' is not null or undefined // verify required parameter 'path' is not null or undefined