Skip to content

Commit

Permalink
Merge pull request #904 from mmikulski/831-expose-http_types-method
Browse files Browse the repository at this point in the history
Fix #831 Expose Method from http_types.
  • Loading branch information
joshtriplett authored May 20, 2023
2 parents acb505e + b5b741f commit 3d50409
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub use response_builder::ResponseBuilder;
pub use route::Route;
pub use server::Server;

pub use http_types::{self as http, Body, Error, Status, StatusCode};
pub use http_types::{self as http, Body, Error, Method, Status, StatusCode};

/// Create a new Tide server.
///
Expand Down
4 changes: 2 additions & 2 deletions tests/cookies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_std::prelude::*;
use tide::http::cookies::Cookie;
use tide::http::headers::{COOKIE, SET_COOKIE};

use tide::{Request, Response, Server, StatusCode};
use tide::{Method, Request, Response, Server, StatusCode};

static COOKIE_NAME: &str = "testCookie";

Expand Down Expand Up @@ -46,7 +46,7 @@ fn app() -> crate::Server<()> {
async fn make_request(endpoint: &str) -> http_types::Response {
let app = app();
let mut req = http_types::Request::new(
http_types::Method::Get,
Method::Get,
http_types::url::Url::parse("http://example.com")
.unwrap()
.join(endpoint)
Expand Down
4 changes: 2 additions & 2 deletions tests/params.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use http_types::{self, Method, Url};
use tide::{self, Request, Response, Result};
use http_types::{self, Url};
use tide::{self, Method, Request, Response, Result};

#[async_std::test]
async fn test_missing_param() -> tide::Result<()> {
Expand Down
3 changes: 2 additions & 1 deletion tests/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ mod unix_tests {
use async_std::os::unix::net::UnixStream;
use async_std::prelude::*;
use async_std::task;
use http_types::{url::Url, Method, Request};
use http_types::{url::Url, Request};
use std::time::Duration;
use tide::Method;
use tempfile::tempdir;

#[test]
Expand Down

0 comments on commit 3d50409

Please sign in to comment.