NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
How to return specific HTTP status/errorcode?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to return specific HTTP status/errorcode? (Read 4720 times)
Djordje Radovanovic
Full Member
Posts: 237
How to return specific HTTP status/errorcode?
«
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
Logged
bshields
Sr. Member
Posts: 392
Re: How to return specific HTTP status/errorcode?
«
Reply #1 on:
September 27, 2018, 08:01:34 PM »
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
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
How to return specific HTTP status/errorcode?