aditjind_crate/http/mod.rs
1/*
2 * Licensed to Elasticsearch B.V. under one or more contributor
3 * license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright
5 * ownership. Elasticsearch B.V. licenses this file to you under
6 * the Apache License, Version 2.0 (the "License"); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20/*
21 * SPDX-License-Identifier: Apache-2.0
22 *
23 * The OpenSearch Contributors require contributions made to
24 * this file be licensed under the Apache-2.0 license or a
25 * compatible open source license.
26 *
27 * Modifications Copyright OpenSearch Contributors. See
28 * GitHub history for details.
29 */
30
31//! HTTP components
32
33pub mod headers;
34pub mod request;
35pub mod response;
36pub mod transport;
37
38pub use reqwest::StatusCode;
39pub use url::Url;
40
41/// Http methods supported by Elasticsearch
42#[derive(Debug, Clone, Copy, PartialEq)]
43pub enum Method {
44 /// get
45 Get,
46 /// put
47 Put,
48 /// post
49 Post,
50 /// delete
51 Delete,
52 /// head
53 Head,
54}