/ballerina-logger-service

Basic Ballerina service to extract plain text from a http POST request and log that. Just an example do demonstrate how to work with plan text instead of json. It was an example to clarify a question from WSO2 LATAM Slack Community

Primary LanguageBallerina

Ballerina Logger

This is a ballerina service example that works with plain text instead of JSON. This has been done to clarify a question that came up from the WSO2 LATAM Community on Slack. Join Slack Community here

Prerequisites

Ballerina installed and configured - ballerina/0.990.3

How to run

  1. Open the service path on a terminal window.

  2. Execute ballerina:

run logger_service.bal

Output

  1. Call ballerina service:

Using CURL:

curl -X POST -d "teste" -H "Content-Type: text/plain" http://localhost:3000/api/logger

Or using Postman

Output