Skip to content

Handeling 3xx Redirection error #9

@anmolgkv

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?

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