Skip to content

Instantly share code, notes, and snippets.

package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
"github.com/gin-gonic/gin"
)
router.Use(func(c *gin.Context) {
// Forward the request to the target server
proxy.ServeHTTP(c.Writer, c.Request)
})
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
"github.com/gin-gonic/gin"
)
@cheikhsimsol
cheikhsimsol / video_stream.go
Created December 30, 2024 19:37
Full video stream example
package main
import (
"fmt"
"io"
"log"
"net/http"
"strconv"
"strings"
)