Skip to content

Home

Introduction

Development

IDEs

Services

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

ProxyRequestMethods

The ProxyRequestMethods class contains one-liners for proxying HTTP requests to a different server. Below are different ways demonstrating the use of the methods of this class:

Sample Gloop service showing how to use the `ProxyRequestMethods` one-liners

1
2
3
4
@RequestMapping('/legacy/**') 
void callLegacyApi(HttpServletRequest request, HttpServletResponse response) {
    request.proxy(response, 'http://www.legacy.api/sub/path')
}