Page 1 of 1

AP_SetStatusCode

PostPosted: Mon Feb 26, 2024 4:40 am
by Otto
Hello friends,
I find AP_SetContentType("application/json") in apache.prg as EXTERN but I can't find

AP_SetStatusCode(200) and AP_AddHeader("Another-Header", "HeaderValue").
Are these in another part of sourcecode?
Best regards,
Otto

Re: AP_SetStatusCode

PostPosted: Mon Feb 26, 2024 8:06 am
by Antonio Linares
Dear Otto,

200 is returned by defaut by Apache. If you want to return a different value then you have to use ErrorLevel( nValue ) in example: ErrorLevel( 408 )

Re: AP_SetStatusCode

PostPosted: Mon Feb 26, 2024 11:50 am
by Antonio Linares
Dear Otto,

> AP_AddHeader("Another-Header", "HeaderValue")

Do you mean in headers or out headers ? I guess out headers, if so:

AP_HeadersOutSet( cKey, cValue )