NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Djordje Radovanovic on September 27, 2018, 05:11:24 AM
-
In some cases I need to return specific status code, 200, 401, 500+, whatever.
How can I do it?
Best regards,
Djordje Radovanovic
-
Hi Djordje,
Depending upon the status code, you do things a bit differently:
Status Code 2XX
p_web.ReplyResponseNumber = 201
200 and 206 are handled by NetTalk automatically (and maybe others)
Status Codes 3XX
p_web.Redirect('http://somewhereelse.com',,,301)
Status Codes 4XX & 5XX
p_web.SendError(401,'Unauthorized','You must authorize to use this service')
Regards
Bill