Class HttpClient


  • public class HttpClient
    extends Object
    Jersey client with post and get methods
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpClient()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <R> R get​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType, String requestUrl)
      Executes a get request
      static <R> R post​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType, String requestUrl, Object obj)
      Executes a post request
      static <R> R postFormData​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType, String requestUrl, javax.ws.rs.core.Form form)
      Executes a post request
    • Constructor Detail

      • HttpClient

        public HttpClient()
    • Method Detail

      • get

        public static <R> R get​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType,
                                String requestUrl)
        Executes a get request
        Parameters:
        returnType -
        requestUrl -
        Returns:
      • post

        public static <R> R post​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType,
                                 String requestUrl,
                                 Object obj)
        Executes a post request
        Parameters:
        returnType -
        requestUrl -
        obj -
        Returns:
      • postFormData

        public static <R> R postFormData​(javax.ws.rs.core.GenericType<org.gcube.social_networking.socialnetworking.model.output.ResponseBean<R>> returnType,
                                         String requestUrl,
                                         javax.ws.rs.core.Form form)
        Executes a post request
        Parameters:
        returnType -
        requestUrl -
        obj -
        Returns: