Open durraniu opened 3 months ago
By the way, the same happens with the python shiny app. Running the post request outside shiny shows that the same 422 error occurs:
d = {
"bill_length_mm" : 30,
"sex_Male" : True,
"species_Gentoo" : True,
"species_Chinstrap" : True
}
import requests
r = requests.post('http://127.0.0.1:8080/predict', json = d)
r
<Response [422]>
I ran
app.run(port = 8080)
which opened the docs page in browser. Clicking the Try button under Predict POST request produces a prediction (200 OK). However, the R shiny app displays the errorHTTP 422 Unprocessable Entity
. I then ran the code outside of shiny:Dry Run
I checked that the request is correct:
CURL
Running curl works:
So, I translated that to
httr2
syntax:But even that throws the same error:
I am not sure what is going wrong with
httr2
. Any ideas?