Web Api server error!
Hi Sir,
I am currently trying to use your API to add Tashkeel to my words. I followed the instructions provided in your GitHub repository and used the example code, but I am encountering an "Internal Server Error 500" on both iOS and Terminal (Curl).
Here is the complete response from my request:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
[email protected] to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Could you please assist me in resolving this issue? Let me know if you need any additional information from my side.
Thank you for your support!
Salam, can you tell me the API request format. thanks
Of course, The first one from Terminal (Curl);
curl -X POST http://tahadz.com/mishkal/ajaxGet \
-H "Content-Type: application/json" \
-d '{"text":"السلام عليكم", "action":"TashkeelText"}'
and the part of second one from iOS Swift;
let parameters: [String: Any] = [
"text": word,
"action": "TashkeelText"
]
// Convert parameters to JSON data
guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else {
completion(.failure(.decodingError))
return
}
// Prepare request
// Create the URLRequest
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("application/x-www-form-urlencoded; charset=UTF-8", forHTTPHeaderField: "Content-Type")
request.httpBody = postData
Try, using action="Tashkeel2", it will give more data in response. thanks.
Thank you for fast response, I tried with action="Tashkeel2" and it worked but what ever i send it returns {"result": "Zerrouki Taha", "order": "0"} as response