# Defining a new HTTP method: HTTP QUERY

DevFeed: [Defining a new HTTP method: HTTP QUERY](<https://devfeed.tech/articles/defining-a-new-http-method-http-query-19072.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/http-search-method/>)

Author: HTTP Toolkit; Tim Perry

Published: 2021-04-12T15:00:00Z

Content type: article

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [HTTP](<https://devfeed.tech/topics/http.md>), [API](<https://devfeed.tech/topics/api.md>), [Internet Engineering Task Force (IETF)](<https://devfeed.tech/topics/ietf.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [draft](<https://devfeed.tech/tags/draft.md>), [http](<https://devfeed.tech/tags/http.md>), [ietf](<https://devfeed.tech/tags/ietf.md>), [request](<https://devfeed.tech/tags/request.md>), [responses](<https://devfeed.tech/tags/responses.md>), [server](<https://devfeed.tech/tags/server.md>), [standards](<https://devfeed.tech/tags/standards.md>)

## AI overview

This article introduces HTTP QUERY, a new HTTP method for safe requests that include a request body. It explains why the method is needed and compares it with existing HTTP methods such as GET and POST. The article notes that HTTP QUERY was recently adopted as an IETF draft standard and that its specification evolved from the earlier name SEARCH.

## Source excerpt

Nothing is ever finished or perfect, and HTTP is no exception. HTTP QUERY is a new HTTP method, for safe requests that include a request body. It's still early & evolving, but it was recently adopted as an IETF draft standard, and it's going to add some great new tools for HTTP development everywhere. What does that mean, why do we need a new HTTP method, how would HTTP QUERY work? Update: This post previously called this method SEARCH, but since it was originally published the spec has been updated, and the method is now called QUERY. This post has been updated accordingly. HTTP methods today Today, there are 5 main HTTP methods you'll see in modern APIs. To understand how each one works, it's important to remember that HTTP is defined in terms of resources. A resource might be a document, or a photo, or a specific customer, or the whole list of customers, and it's identified by a URL like example.com/customers (all customers of example.com) or example.com/customers/123 (one specific customer). GET A GET request asks the server for a resource. This is frequently used to request HTML pages, read data from an API, or load images. These are intended to be 'safe' requests, which purely read data. They shouldn't change the state of the server, they shouldn't have side effects, and so they can be cached in many cases (which means that many client GET responses will come from a cache, and never hit the real server). GET requests can be parameterized by their URL, which might contain a path and/or query parameters, but they can't have a request body. It's not specifically banned, but it is defined as being completely meaningless, and many existing implementations will ignore the body or reject the request entirely if you try to send one. They can also use Accept, Accept-Language and Accept-Encoding headers to request a specific content type, language or encoding ('give me customer 123 as XML please'), and use Range headers to request only part of a document ('give me the f