* @param requestOptions optional RequestOptions to use rather than the
* default.
*/
public static void redirectThroughProxy(ServiceDefTarget serviceDef,
final RequestOptions requestOptions) {
serviceDef.setRpcRequestBuilder(new RpcRequestBuilder() {
@Override
protected RequestBuilder doCreate(String serviceEntryPoint) {
return new GadgetsRequestBuilder(RequestBuilder.POST, serviceEntryPoint, requestOptions);
}
});