integrating groovy with api

56 views Asked by At

I am working over a project, I shall tell you in brief and would like to welcome your answers as detailed as possible.

The project includes codes at the server side. Using groovy, I need to define a DSL, something like:

Fetch code1 from URI abc
Load datavalues from ¨C://abc/xyw¨
Compute code1 with datavalue

For this the DSL being in groovy and to bind this to server, I want to use the REST API. Can someone give directions to lead the project and some short notes for the code.

Thanks in advance.

Groovy Code :

import datavalue;
import loadcode;

String value1;
class computing2{
def computing1 = {println("I am computing code" )}

def compute(String code){
[with: { value1 ->
    computing1()
            }]
}
}
def abcd = new computing2() 
abcd.compute "code1" with "value1"

With this groovy code I want to bind a REST API as to which code and value be the resource and we here dont use variable but the reference to the resource so that I can interact with the server end and run the code. For questions dont hesitate to comment. Understanding its kind of lengthy but really in search of the way out to it.

0

There are 0 answers