Skip to content

Commit

Permalink
message module to request module.
Browse files Browse the repository at this point in the history
  • Loading branch information
EkardNT committed Apr 6, 2021
1 parent b92f79f commit 6b75a58
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/basic_sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use std::collections::HashMap;

use bytes::BytesMut;
use http_sign::*;
use http_sign::message::{BorrowedHttpRequest, Method};
use http_sign::request::{BorrowedHttpRequest, Method};
use ring::{rand::SystemRandom, signature::RsaKeyPair};

static KEY: &'static [u8] = include_bytes!("example-rsa-2048-key.pk8");

fn main() {
let mut headers = HashMap::new();
headers.insert("x-foo".to_string(), "bar".to_string());
let mut request = http_sign::message::OwnedHttpRequest::new(
let mut request = http_sign::request::OwnedHttpRequest::new(
Method::Get,
"/foo/bar".to_string(),
Some("foo=bar".to_string()),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![feature(min_type_alias_impl_trait)]

mod algorithm;
pub mod message;
pub mod request;
mod signature;

#[allow(deprecated)]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::SystemTime;

use bytes::{BufMut, BytesMut};

use crate::{algorithm::SignatureAlgorithm, message::{Headers, HttpRequest}};
use crate::{algorithm::SignatureAlgorithm, request::{Headers, HttpRequest}};

/// An element that contributes to the signature calculation. Standard HTTP headers may
/// be included in the signature, as well as special non-header fields such as
Expand Down

0 comments on commit 6b75a58

Please sign in to comment.