logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ne_redirect_register, ne_redirect_location - HTTP request redirect handling

Description

       The ne_redirect_register function registers redirect handling for the session. If a valid redirect (with
       status code 3xx) response is processed, the request will fail with the NE_REDIRECT error code. The
       destination of the redirect can then be retrieved using ne_redirect_location.

       If a redirect was processed, the ne_redirect_location function returns the destination URI of the
       redirect.

Name

       ne_redirect_register, ne_redirect_location - HTTP request redirect handling

Return Value

ne_redirect_location returns NULL if no request has yet been processed, if the current request was not a
       redirect, or if the destination of the redirect could not be parsed or resolved. Otherwise it returns a
       pointer to an ne_uri object, which remains valid until another request is created for the session.

See Also

       ne_session_create.

Synopsis

#include<ne_redirect.h>voidne_redirect_register(ne_session*sess);constne_uri*ne_redirect_location(ne_session*sess);

See Also