/* ------------------------------------------ */ public struct rest_request * liberate_rest_request(struct rest_request * sptr) { struct rest_header * mptr; if ( sptr ) { while ((mptr = sptr->first) != (struct rest_header *) 0) { sptr->first = mptr->next; mptr = liberate_rest_header( mptr ); } if ( sptr->method ) sptr->method = liberate(sptr->method); if ( sptr->object ) sptr->object = liberate(sptr->object); if ( sptr->parameters ) sptr->parameters = liberate(sptr->parameters); if ( sptr->version ) sptr->version = liberate(sptr->version); if ( sptr->body ) sptr->body = liberate(sptr->body); if ( sptr->host ) sptr->host = liberate(sptr->host); sptr = liberate( sptr ); } return((struct rest_request *) 0); }
/* -------------------------------------------- */ public struct rest_response * liberate_rest_response(struct rest_response * sptr) { struct rest_header * mptr; if ( sptr ) { while ((mptr = sptr->first) != (struct rest_header *) 0) { sptr->first = mptr->next; mptr = liberate_rest_header( mptr ); } if ( sptr->version ) sptr->version = liberate(sptr->version); if ( sptr->message ) sptr->message = liberate(sptr->message); if ( sptr->body ) sptr->body = liberate(sptr->body); sptr = liberate( sptr ); } return((struct rest_response *) 0); }
/* ---------------------------------------- */ public struct rest_client * liberate_rest_client(struct rest_client * sptr) { if ( sptr ) { if ( sptr->agent ) sptr->agent = liberate(sptr->agent); if ( sptr->buffer ) sptr->buffer = liberate(sptr->buffer); if ( sptr->user ) sptr->user = liberate(sptr->user); if ( sptr->pass ) sptr->pass = liberate(sptr->pass); if ( sptr->hostname ) sptr->hostname = liberate(sptr->hostname); if ( sptr->headers ) sptr->headers = liberate_rest_header(sptr->headers); if ( sptr->tlsconf ) sptr->tlsconf = release_tls_configuration( sptr->tlsconf ); sptr = liberate( sptr ); } return((struct rest_client *) 0); }