protected Response post ( Object payload , Object ... pathArgs ) throws IOException { URL url = getApiUrl ( pathArgs ) ; Entity < ? > entity = Entity . entity ( payload , MediaType . APPLICATION_JSON ) ; return ( invocation ( url , null ) . post ( entity ) ) ; }
Perform an HTTP POST call with the specified payload object and URL returning a ClientResponse instance with the data returned from the endpoint .