Skip to main content

Groovy Script

Explanation

This script performs the following operations:
  1. API Call: Makes HTTP request to Yahoo Weather API
  2. JSON Parse: Parses JSON response
  3. Data Extraction: Extracts weather information
  4. Data Transmission: Transmits this information to backend as header, URL parameter, or body
  5. Error Management: Transmits error information in case of error
This script should be run on the request line (Request Policy) because it uses the requestHeaderMapToTargetAPI and requestUrlParamMapToTargetAPI variables.