How would you deal with it to perform some checks on server connect against a value sent in a form? I need to hash the input password, send the 5 first characters from the hash to the API via URL(0F3FB in the example), retrieve the contents, search in the response for the full hash password and return to the form info.
We only work with json sources normally and aren’t going to add parsers for other content formats. I have added some autodetection to the API action so that it should return the raw data as string when it doesn’t have a json content-type header, which is in your case probably exactly what you want. You then have to parse the string content yourself. Please test if it works.
I can’t confirm this is the case but changes like this would usually be integrated into the next update so I would expect this to already be part of Wappler.
Unfortunately not. The callbacks (from daily co teleconferencing) are JSON but the content type is text/plain. As a result, wappler isn’t processing them.
I’ve replicates the post entirely using postman and changing to JSON works.
I’m having the same problem. Wappler can not parse non Json Format while fetch schema process.
How can we solve this issue?
I am having a problem retrieving data from an API Source GET.
No data has been set under data after Fetch Schema
Well that’s not a valid JSON that’s why we cannot fetch the schema. The ok: JSON follows part should not be there. This won’t really validate in any JSON validator out there.
Ok than do you have an idea how to parse this plain string text into array.
I did split text after ok:JSON follows.(it has been removed by “set value splittedtext = api.data.split(‘follows’)[1])” at server side.
Below attached sample data after split;(Do you have an example parser for this multiple row values into an array?)
{
“status”: “OK”,
“data”:
[
{ “value1”: 1, “value2”: “test”, “value3”: 11, “value4”: “valueresult”, “value5”: “11.22.33.44” }
{ “value1”: 2, “value2”: “test”, “value3”: 22, “value4”: “valueresult”, “value5”: “11.22.33.45” }
{ “value1”: 3, “value2”: “test”, “value3”: 33, “value4”: “valueresult”, “value5”: “11.22.33.46” }
{ “value1”: 4, “value2”: “test”, “value3”: 44, “value4”: “valueresult”, “value5”: “11.22.33.47” }
{ “value1”: 5, “value2”: “test”, “value3”: 55, “value4”: “valueresult”, “value5”: “11.22.33.48” }
]
}
set value results = api.data.split(‘follows’)[1].parseJSON()
Wappler will not recognize the data correctly since it doesn’t know what the results contains. So with the data picker it probably will not show as an array.