Https request without authentication

From i2Rest
Jump to: navigation, search

Saying "request without authentication" we mean that no authentication data is handling by default with this option. When you use one of the other options, i2Rest Client will do some magic to make your request authenticated, but with this one - everything in your hands. Such "no authentication" requests an irreplaceable part of every complex automated authorization scenario like Client credential flow or Device flow description. Also take a look how to make your request authenticated with the sequence of manualy processed "no authentication" requests and responces.

The simpliest example

Just choose *None Authentication method, specify URI to be requested and request type - that's all.

  I2REST COMMAND(*GET) 
         URL('http://apache.org') 
         AUTHMETHOD(*NONE) 


Handling logs and SSL

Lets exemine some more complicated example:

  I2REST COMMAND(*GET)                       
         URL('https://github.com')           
         OUTPUT(*BOTH)                       
         DCMCLIENT(MYCLIENT)                 
         RECVLOG('/home/usrx/recv.log')      
         SENTLOG('/home/usrx/sent.log')      
         AUTHMETHOD(*NONE)      

Dealing with SSL/TLS secured resources you have to setup your IBM i DCM client.
Result of a request could be checked in a joblog and/or printer output file, according to a value of "Output log events to" parameter.
All the data transferred from/to remote server will be saved to log files specified in parameters «Log recv messages» and «Log sent messages».