This plugin adds gateway support for a REST API to Play! Framework 1 applications.
require:
- gateway -> gateway 1.1.0
repositories:
- sismicsNexusRaw:
type: http
artifact: "https://nexus.sismics.com/repository/sismics/[module]-[revision].zip"
contains:
- gateway -> *
# Gateway routes
# This file defines all gateway routes (Higher priority routes first)
# ~~~~
/api/geocode https://anotherapi.company.com/geocode
/api/timezone https://anotherapi.company.com/timezone
Alternately, you can also add gateway APIs with Java code:
public static void geocode() {
new Gateway.Builder()
.setBasicAuth("username", "password")
.build()
.proxy(request, response, "https://anotherapi.company.com/geocode");
}
This software is released under the terms of the Apache License, Version 2.0. See LICENSE
for more
information or see https://opensource.org/licenses/Apache-2.0.