Skip to content

Commit

Permalink
[HOPSWORKS-2633][fix] Fix request payload encoding (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdlrm committed Feb 10, 2022
1 parent d0d2141 commit cb61003
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
@TransactionAttribute(TransactionAttributeType.NEVER)
public class ServingInferenceUtils {

/**
* Builds an inference request to be sent to a model deployment. All implementations of ServingInferenceController
* must use this method to build the inference request.
*
* @param host host of the deployment where the model server is running
* @param port port of the deployment where the model server is listening to
* @param path inference path
* @param json request payload
* @return the inference request
* @throws URISyntaxException
*/
public HttpPost buildInferenceRequest(String host, int port, String path, String json) throws URISyntaxException {
URI uri = new URIBuilder()
.setScheme("http")
Expand Down

0 comments on commit cb61003

Please sign in to comment.