mirror of
https://github.com/aler9/gortsplib
synced 2025-10-21 14:19:36 +08:00
add Request.String(), Response.String()
This commit is contained in:
@@ -3,6 +3,7 @@ package base
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
@@ -133,3 +134,10 @@ func (req Request) Write(bw *bufio.Writer) error {
|
||||
|
||||
return bw.Flush()
|
||||
}
|
||||
|
||||
// String implements fmt.Stringer.
|
||||
func (req Request) String() string {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
req.Write(bufio.NewWriter(buf))
|
||||
return buf.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user