• Documentation of Corr Tool
    • Installation
    • Journey Programming Language
      • Data Types
      • Expressions
      • Templates
      • Statements
        • Rest Operations
        • Service Virtualisation
          • Endpoint Definition
          • Tag Server Example

Service Virtualisation

You can create Dynamic servers on a specified port using dynamic service virtualization abilities of journey programming language. A journey programming language provides first-class support for creating servers.

Syntax

listen on <expression resulting in port number> with {
    <endpoint definations>
}

Options

  • expression resulting in port number : (Required) You can pass any constant valid port number like 4300 or expression resulting in port number
  • endpoint definitions: You can pass any number of endpoint definitions to define what each endpoint does

Example Usage

For Detailed example have a look at Tag Server Example

listen on 8088 with {
    on post with url text `/<%name%>` matching request body object {"filed1":field1} and headers { "header1":header1 } {
        let count = count + 1
        respond with status 200 and body object {"message":concat("Hello ",name)}
    }
}