API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  Context Variable to print HTTP method

    Posted 03/25/22 11:20 AM
    Hello Team,

    I need to know which context variable used to print http methods (GET,POST,PUT,DELETE) using gateway script.

    Regards,
    Jyoti


    ------------------------------
    Jyoti Yadav
    ------------------------------


  • 2.  RE: Context Variable to print HTTP method

    Posted 03/25/22 11:59 AM

    Hi Jyoti,

    You'll need to access service-metadata, in GatewayScript

    let sm = require('service-metadata');
    let method = sm.protocolMethod;  // GET, POST, etc

    Regards,

    Steve



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------