Bubble proxy service
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 4 година
123456789101112
  1. /**
  2. * Copyright (c) 2020 Bubble, Inc. All rights reserved.
  3. * For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. */
  5. use hyper::{Body, Response};
  6. pub fn bad_request(message: &str) -> Result<Response<Body>, hyper::Error> {
  7. let mut resp = Response::new(Body::from(String::from(message)));
  8. *resp.status_mut() = http::StatusCode::BAD_REQUEST;
  9. return Ok(resp);
  10. }