# Ignore 302 Redirect using aurelia-http-client

**URL:** <https://discourse.aurelia.io/t/ignore-302-redirect-using-aurelia-http-client/5136>\
**Category:** Help Requests\
**Created:** [March 29, 2023, 9:34am UTC](https://discourse.aurelia.io/t/ignore-302-redirect-using-aurelia-http-client/5136 "2023-03-29T09:34:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![weastaugh](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/weastaugh/32/958_2.png) [@weastaugh](https://discourse.aurelia.io/u/weastaugh)\
**Post date:** [March 29, 2023, 9:34am UTC](https://discourse.aurelia.io/t/ignore-302-redirect-using-aurelia-http-client/5136/1 "2023-03-29T09:34:48Z")

</div>

Hi,

Using the aurelia-http-client, when I receive a 302 redirect from the server, the http client follows the redirect and responds with whatever the result of the redirect was.

I want to avoid this behaviour and deal with the 302 in my code. Is this possible?

I already have interceptors for other status codes but I don’t get to see the 302 because the http client has already dealt with it under the covers and all I get to see is the result after the redirect.

Thanks in advance.

Wayne

---

<div class="post-metadata">

**Author:** ![Sayan751](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/sayan751/32/1861_2.png) [@Sayan751](https://discourse.aurelia.io/u/Sayan751)\
**Post date:** [March 29, 2023, 4:10pm UTC](https://discourse.aurelia.io/t/ignore-302-redirect-using-aurelia-http-client/5136/2 "2023-03-29T16:10:15Z")

</div>

If you use the fetch client instead of the http client, then you can use the [`redirect: error`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) and then handle the error as you like.
