Skip to content

Commit

Permalink
http version
Browse files Browse the repository at this point in the history
  • Loading branch information
holmofy committed Oct 20, 2024
1 parent 072cb2d commit 359631b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reqwest-scraper-macros/src/include_http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl syn::parse::Parse for IncludeHttp {

lazy_static! {
static ref SNIPPET_SPLITTER: Regex = Regex::new(r"#{3,}").unwrap();
static ref HTTP_RE: Regex = Regex::new(r"(?<name>\w+)\n(?<method>GET|POST|HEAD|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE)\s*(?<url>https?://\S+)(?:\n(?<headers>(?:\S+:\s+[^\n]+\n)*)\n?(?<body>[\s\S]*))?").unwrap();
static ref HTTP_RE: Regex = Regex::new(r"(?<name>\w+)\n(?<method>GET|POST|HEAD|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE)\s*(?<url>https?://\S+)(?:\s+HTTP/[\d.]+)?(?:\n(?<headers>(?:\S+:\s+[^\n]+\n)*)\n?(?<body>[\s\S]*))?").unwrap();
static ref HEADER_RE: Regex = Regex::new(r"(?<key>\S+):\s*(?<value>[^\n]+)").unwrap();
static ref VARIABLE_RE: Regex = Regex::new(r"\{(?<ident>\w+)(?::\s*(?<ty>\w+))?\}").unwrap();
}
Expand Down

0 comments on commit 359631b

Please sign in to comment.