Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 701 Bytes

File metadata and controls

17 lines (13 loc) · 701 Bytes

Sample interceptors which are relevant for WSO2 API Microgateway request and response formatting.

Module Overview

This module provides two basic interceptors for json to xml and xml to json message transformations.

  1. The request interceptor (xmlToJsonFormatter.bal) will convert a XML payload to a JSON payload.

    Syntax:

    x-wso2-request-interceptor: praminda/formatters/0.4.0:formatRequest
  2. The response interceptor (jsonToXmlFormatter.bal) will convert a JSON payload to a XML payload.

    Syntax:

    x-wso2-response-interceptor: praminda/formatters/0.4.0:formatResponse