HttpTransmitGoto


int HttpTransmitGoto ( HttpConnection hConn , const char *pUrl , const char *pParam , int iDissconect )




 
Used in request callback for moving to an other url

 
hConn pointer to the connection data
 
pUrl is the new url (i.e: "http:www.google.at/xyz.html")
 
pParam will be added behind the url (i.e.: "url:param")
 
iDissconect should the connection be closed after that request
 
Returns 307 "Moved temporarily" or 500 if buffer too small.
 

i.e.:

    int RequestCallback(HttpConnection hConn,int iCommand,const char *pHost,const char *pUrl,const char *pParams,int iUrlLen,int iParamLen)
    {
        ...

        if(IsNotMyUrl(pUrl))
            {
            return 0;
            }

        ...

    return HttpTransmitGoto(hConn,"www.newdomain.com\indext.html",""); 
    } 

 

 

see also:

AzHttp Overview | HttpDaemon | HttpStopDaemon | HttpTransmitCallback | HttpTransmitFile | HttpTransmitMemory