>> I want to create a REST Service call (GET), where Guacamole Application 
>> gives all users logged(sessionMap attribute(its keys) from 
>> HashTokenSessionMap class). First this call is going to be called from a 
>> script >> perl. One by one, by its identifier is going to be called other 
>> REST Service call (from TokenRESTService.java file). This last call, is also 
>> called from Perl script.

>>    @DELETE
>>    @Path("/{token}")
>>    public void invalidateToken(@PathParam("token") String authToken)
>>            throws GuacamoleException {

>>        // Invalidate session, if it exists
>>        if (!authenticationService.destroyGuacamoleSession(authToken))
>>            throw new GuacamoleResourceNotFoundException("No such token.");

 >>  }

 >> All this, in order to cancel users of the web application. This will be 
 >> temporal, meanwhile I finish the logged in users page, similar to the 
 >> active sessions page

This is REST service call response:

$VAR1 = bless( {
                 '_res' => bless( {
                                    '_rc' => '200',
                                    '_msg' => '',
                                    '_content' => 
'{"gabriel":"4C78017C80148A5742E32E155D9A072A93AD9FFCFFC92A97FBE8F3B547469475"}',
                                    '_request' => bless( {
                                                           '_uri' => bless( 
do{\(my $o = 'http://XX.XX.X.XXX:XXX /ga/api/tokens/all')}, 'URI::http' ),
                                                           '_headers' => bless( 
{
                                                                                
  'content-type' => 'application/json',
                                                                                
  'content-length' => 0,
                                                                                
  'authorization' => 'Basic Y25zc2lzdGU6VDF0NG4zcyE=
',
                                                                                
  'connection' => 'close',
                                                                                
  'user-agent' => 'REST::Client/281'
                                                                                
}, 'HTTP::Headers' ),
                                                           '_method' => 'GET',
                                                           '_content' => '',
                                                           '_uri_canonical' => 
$VAR1->{'_res'}{'_request'}{'_uri'}
                                                         }, 'HTTP::Request' ),
                                    '_headers' => bless( {
                                                           '::std_case' => {
                                                                             
'client-response-num' => 'Client-Response-Num',
                                                                             
'client-peer' => 'Client-Peer',
                                                                             
'client-date' => 'Client-Date'
                                                                           },
                                                           
'client-response-num' => 1,
                                                           'client-date' => 
'Wed, 21 Jun 2023 19:24:30 GMT',
                                                           'connection' => 
'close',
                                                           'content-type' => 
'application/json',
                                                           'client-peer' => 
'XX.XX.X.XXX:XXX',
                                                           'date' => 'Wed, 21 
Jun 2023 19:24:30 GMT',
                                                           'content-length' => 
'78'
                                                         }, 'HTTP::Headers' ),
                                    '_protocol' => 'HTTP/1.1'
                                  }, 'HTTP::Response' ),
                 '_config' => {
                                'host' => 'http://XX.XX.X.XXX:XXX ',
                                'useragent' => bless( {
                                                        'handlers' => {
                                                                        
'response_header' => bless( [
                                                                                
                      {
                                                                                
                        'line' => '/usr/share/perl5/LWP/UserAgent.pm:768',
                                                                                
                        'callback' => sub { "DUMMY" },
                                                                                
                        'owner' => 'LWP::UserAgent::parse_head',
                                                                                
                        'm_media_type' => 'html'
                                                                                
                      }
                                                                                
                    ], 'HTTP::Config' )
                                                                      },
                                                        'show_progress' => 
undef,
                                                        'protocols_allowed' => 
undef,
                                                        'max_size' => undef,
                                                        'no_proxy' => [],
                                                        'timeout' => 300,
                                                        'requests_redirectable' 
=> [
                                                                                
     'GET',
                                                                                
     'HEAD'
                                                                                
   ],
                                                        'def_headers' => bless( 
{
                                                                                
  'user-agent' => 'REST::Client/281'
                                                                                
}, 'HTTP::Headers' ),
                                                        'protocols_forbidden' 
=> undef,
                                                        'max_redirect' => 7,
                                                        'send_te' => 1,
                                                        'use_eval' => 1,
                                                        'ssl_opts' => {
                                                                        
'verify_hostname' => 1
                                                                      },
                                                        'proxy' => {},
                                                        'local_address' => undef
                                                      }, 'LWP::UserAgent' )
                              }
               }, 'REST::Client' );

From Perl script with $client->responseCode(), I get 200 (which is  '_rc' => 
'200'). How can I get field _content? 

                                    '_content' => 
'{"gabriel":"4C78017C80148A5742E32E155D9A072A93AD9FFCFFC92A97FBE8F3B547469475"}',

-Gabriel

Reply via email to