You probably created the constant like below:
Notice the yellow input field being empty, this is the value of the constant, when this is empty you’ll get the error in the stacktrace:
Caused by: org.apache.http.ProtocolException: Target host is not specified
Make sure to set the location of the REST service in the value field and this error will no longer occur.
Be aware though that when you created the json snippet the price attribute was probably created as an integer, make sure to change this to a decimal by using the JSON below:
[
{
"Number": "string",
"Name": "string",
"UnitPrice": 0.0,
"Color": "NoColor",
"Stores": [
{
"Number": 0
}
]
}
]
The price you’ll get is a decimal and not an integer.
Hope this helps you in following the lecture further