Class RestRequestFactory


  • @Component
    public class RestRequestFactory
    extends Object
    A factory for creating and building RestRequest objects from rest-services.properties
    Author:
    Manoj SP
    • Constructor Detail

      • RestRequestFactory

        public RestRequestFactory()
    • Method Detail

      • buildRequest

        public io.mosip.idrepository.core.dto.RestRequestDTO buildRequest​(RestServicesConstants restService,
                                                                          Object requestBody,
                                                                          Class<?> returnType)
                                                                   throws IDDataValidationException
        Builds the request.
        Parameters:
        restService - the rest service
        requestBody - the request body
        returnType - the return type
        Returns:
        the rest request DTO
        Throws:
        IDDataValidationException - the ID data validation exception
      • createRequest

        public static <T> io.mosip.kernel.core.http.RequestWrapper<T> createRequest​(T t)