All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.descope.proxy.impl.ApiProxyImpl Maven / Gradle / Ivy

The newest version!
package com.descope.proxy.impl;

import com.descope.model.client.SdkInfo;
import com.descope.proxy.ApiProxy;
import com.fasterxml.jackson.core.type.TypeReference;
import java.net.URI;
import java.util.function.Supplier;

class ApiProxyImpl extends AbstractProxyImpl implements ApiProxy {

  public ApiProxyImpl(SdkInfo sdkInfo) {
    setSdkInfo(sdkInfo);
  }

  public ApiProxyImpl(Supplier authHeaderSupplier, SdkInfo sdkInfo) {
    setAuthHeader("Authorization", authHeaderSupplier);
    setSdkInfo(sdkInfo);
  }

  @Override
  public  R post(URI uri, B body, Class returnClz) {
    return super.post(uri, body, returnClz);
  }

  @Override
  public  R patch(URI uri, B body, Class returnClz) {
    return super.patch(uri, body, returnClz);
  }

  @Override
  public  R postAndGetArray(URI uri, B body, TypeReference typeReference) {
    return super.post(uri, body, typeReference);
  }

  @Override
  public  R get(URI uri, Class returnClz) {
    return super.get(uri, returnClz);
  }

  @Override
  public  R getArray(URI uri, TypeReference typeReference) {
    return super.get(uri, typeReference);
  }

  @Override
  public  R delete(URI uri, B body, Class returnClz) {
    return super.delete(uri, body, returnClz);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy