<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/react-query---abort-request-b3ayj55c1" -->

---
title: React Query - Abort Request | daily.dev
description: AbortSignal is a javascript interface used to abort ongoing methods. When you create a request, both accept a signal and if you abort that signal you can abort...
canonical: https://daily.dev/posts/react-query---abort-request-b3ayj55c1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: React Query - Abort Request | daily.dev
og:description: AbortSignal is a javascript interface used to abort ongoing methods. When you create a request, both accept a signal and if you abort that signal you can abort...
og:url: https://daily.dev/posts/react-query---abort-request-b3ayj55c1
og:image: https://api.daily.dev/og/posts/b3aYj55C1.png
og:image:alt: React Query - Abort Request
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# React Query - Abort Request

**[This is Learning](https://daily.dev/sources/til)** · [@puppo](https://daily.dev/puppo) · 3 min read · 14 upvotes · 0 comments

## Summary

AbortSignal is a javascript interface used to abort ongoing methods. When you create a request, both accept a signal and if you abort that signal you can abort the request. Using these interfaces, you can handle out-of-the-box the abort of an HTTP request created with the fetch API but also with axios if you want.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/this-is-learning/react-query-abort-request-31j6>

---

Tags: [#react](https://daily.dev/tags/react), [#javascript](https://daily.dev/tags/javascript), [#react-query](https://daily.dev/tags/react-query)

[View this post on daily.dev](https://daily.dev/posts/react-query---abort-request-b3ayj55c1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"React Query - Abort Request","url":"https://daily.dev/posts/react-query---abort-request-b3ayj55c1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/react-query---abort-request-b3ayj55c1"},"datePublished":"2023-05-17T05:46:20.690Z","dateModified":"2023-05-17T05:46:20.417Z","description":"AbortSignal is a javascript interface used to abort ongoing methods. When you create a request, both accept a signal and if you abort that signal you can abort...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cc4cdeda569b711374a120f4d12401f1?_a=AQADKdt","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cc4cdeda569b711374a120f4d12401f1?_a=AQADKdt","isAccessibleForFree":true,"articleSection":"This is Learning","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Luca Del Puppo","url":"https://daily.dev/puppo","image":"https://avatars.githubusercontent.com/u/2527849?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":980}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/react-query---abort-request-b3ayj55c1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":14},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"react,javascript,react-query","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"This is Learning","item":"https://daily.dev/sources/til"},{"@type":"ListItem","position":3,"name":"React Query - Abort Request"}]}
```

