Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java wrapper do not accept application/json requests #1603

Closed
RafalSkolasinski opened this issue Mar 25, 2020 · 1 comment
Closed

Java wrapper do not accept application/json requests #1603

RafalSkolasinski opened this issue Mar 25, 2020 · 1 comment
Labels

Comments

@RafalSkolasinski
Copy link
Contributor

When Java wrapper (0.1 and 0.2) is deployed with executor one need to send requests as application-form data. See:

with executor

curl -s -X POST \
    -d 'json={"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
    localhost:8003/seldon/seldon/compat-rest-java-02-executor/api/v1.0/predictions

with engine

curl -s -X POST -H 'Content-Type: application/json' \
    -d '{"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
    localhost:8003/seldon/seldon/compat-rest-java-02-engine/api/v1.0/predictions

Error when trying:

curl -s -X POST -H 'Content-Type: application/json' \
    -d '{"data":{"names":["a","b"],"ndarray":[[1.0,2.0]]}}' \
    localhost:8003/seldon/seldon/compat-rest-java-02-executor/api/v1.0/predictions 
{
  "timestamp": 1585152322210,
  "status": 400,
  "error": "Bad Request",
  "exception": "org.springframework.web.bind.MissingServletRequestParameterException",
  "message": "Required String parameter 'json' is not present",
  "path": "/predict"
}
@RafalSkolasinski RafalSkolasinski added bug triage Needs to be triaged and prioritised accordingly labels Mar 25, 2020
@ukclivecox ukclivecox added this to the 1.2 milestone Mar 26, 2020
@ukclivecox ukclivecox removed the triage Needs to be triaged and prioritised accordingly label Mar 26, 2020
@ukclivecox ukclivecox removed this from the 1.2 milestone Apr 23, 2020
@ukclivecox
Copy link
Contributor

We have an upgrade path for the wrapper and users should convert to latest
https://docs.seldon.io/projects/seldon-core/en/latest/reference/upgrading.html#wrapper-compatibility-table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants