Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 549 Bytes

File metadata and controls

7 lines (6 loc) · 549 Bytes

Formatter_Interceptor_Module

This repository contains a module with two sample interceptors where the Request Interceptor converts a xml payload to a json payload and the Response Interceptor converts a json payload to a xml payload.

  1. jsonToXmlFormatter.bal - A response interceptor which converts a JSON payload to a XML payload.
  2. xmlToJsonFormatter.bal - A request interceptor which converts a XML payload to a JSON payload.
  3. formatterInterceptorTest.bal - contains test functions for the request and response interceptors.