Skip to content

Instantly share code, notes, and snippets.

@edgars
Created November 27, 2017 19:49
Show Gist options
  • Save edgars/daafb6ac6fbee51425252fb1eea1bfb3 to your computer and use it in GitHub Desktop.
Save edgars/daafb6ac6fbee51425252fb1eea1bfb3 to your computer and use it in GitHub Desktop.
@http:resourceConfig {
methods:["GET"],
path:"/marcas/{tipoVeiculo}"
}
resource marcas (http:Request req, http:Response res, string tipoVeiculo) {
// https://fipe.parallelum.com.br/api/v1/{carros}/marcas {motos, caminhoes, carros}
http:Response clientResponse = {};
clientResponse, err = httpConnector.get("/"+ tipoVeiculo +"/marcas", {});
println("GET request: Marca Veiculos ");
res.forward(clientResponse);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment