Hi,
I am trying to POST some data through REST web service, but every time i put some data got an ERROR 500.
GET method is working fine, but i don't know how to setup POST method.
JSON shuold be like:
{
"warehouseId": "4",
"items": [
{
"code": "1234",
"name": "product1"
}
]
}
Thanks all !
korchev
2
Hi @Veljko_Dudukovic,
You should add some parameters to your method. Click the "+" button next to Parameters.
Hi @korchev ,
I saw that, and i am trying but without success.
I put one parameter only to catch some response.
Here is postman request which is working.
What i am doing wrong ?
Thanks.
korchev
4
I can't really tell. Check your browser's network tab to see how the HTTP request that the app makes looks like.
Here is service code which is not working:
And here is code which is working (response 200):
I changed in service that
korchev
6
Well this explains it - your parameter definition is not correct. It should be an object with warehouseId property and not an integer.
1 Like
i thought that object will be generated automatically from parameters, but i was wrong.
So for everybody who will need this, let make it simple:
- Inside Data => Edit Data Source create object with type (int, string etc...)
2.Create method with name and choose type you creted in previous window.
- Call created method from Radzen (buttonClick example)
Thanks !
2 Likes