Skip to content

Commit 48640be

Browse files
committed
fix Payload::parse_response -> Payload::parse_http
we don't parse a response from twitch, but a request
1 parent 94c4c59 commit 48640be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/eventsub/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ impl Payload {
153153
}
154154

155155
// FIXME: Should not throwaway headers etc
156-
/// Parse http response as a [Payload].
157-
pub fn parse_response(source: &http::Response<Vec<u8>>) -> Result<Payload, PayloadParseError> {
156+
/// Parse http post request as a [Payload].
157+
pub fn parse_http(source: &http::Request<Vec<u8>>) -> Result<Payload, PayloadParseError> {
158158
Payload::parse(std::str::from_utf8(source.body())?)
159159
}
160160
}

0 commit comments

Comments
 (0)