Skip to content

Handeling 3xx Redirection error #9

Description

@anmolgkv

I am trying to consume an API which returns 303 status code and redirect location.

In ffhttp_Client.AbstractClientRequest.executeUnparsed() method the code checks for status code between 300 and 400 and throws exception with message

3xx Redirection error which is currently unhandled

With this behavior response along with its header is lost.

The two solutions in the current approach are

  1. override handleRedirection() method and throw an exception with redirect URI or do nothing in the overridden method (A dirty fix)
  2. Implement IAbstractClientRequest interface and implement all the methods(Lot of redundant code)

Is there a better way to handle this? maybe make executeUnparsed() method virtual?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions