version 2

This commit is contained in:
John Guo
2021-10-11 21:41:56 +08:00
parent bea54b445e
commit 1bc0635f8b
1053 changed files with 2892 additions and 2892 deletions

View File

@ -8,11 +8,11 @@
package ghttp
import (
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/os/gcache"
"github.com/gogf/gf/os/gsession"
"github.com/gogf/gf/protocol/goai"
"github.com/gogf/gf/v2/container/gmap"
"github.com/gogf/gf/v2/container/gtype"
"github.com/gogf/gf/v2/os/gcache"
"github.com/gogf/gf/v2/os/gsession"
"github.com/gogf/gf/v2/protocol/goai"
"github.com/gorilla/websocket"
"net/http"
"reflect"

View File

@ -7,7 +7,7 @@
package ghttp
import (
"github.com/gogf/gf/net/ghttp/internal/client"
"github.com/gogf/gf/v2/net/ghttp/internal/client"
)
type (

View File

@ -7,9 +7,9 @@
package ghttp
import (
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/net/ghttp/internal/httputil"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/net/ghttp/internal/httputil"
)
// BuildParams builds the request string for the http client. The <params> can be type of:

View File

@ -7,9 +7,9 @@
package ghttp
import (
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
)
type DefaultHandlerResponse struct {

View File

@ -11,13 +11,13 @@ import (
"io/ioutil"
"net/http"
"github.com/gogf/gf"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/net/ghttp/internal/client"
"github.com/gogf/gf/net/ghttp/internal/httputil"
"github.com/gogf/gf/net/gtrace"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/net/ghttp/internal/client"
"github.com/gogf/gf/v2/net/ghttp/internal/httputil"
"github.com/gogf/gf/v2/net/gtrace"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
@ -26,7 +26,7 @@ import (
)
const (
tracingInstrumentName = "github.com/gogf/gf/net/ghttp.Server"
tracingInstrumentName = "github.com/gogf/gf/v2/net/ghttp.Server"
tracingEventHttpRequest = "http.request"
tracingEventHttpRequestHeaders = "http.request.headers"
tracingEventHttpRequestBaggage = "http.request.baggage"

View File

@ -13,14 +13,14 @@ import (
"strings"
"time"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/os/gsession"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/util/guid"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/v2/os/gsession"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/v2/util/guid"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gregex"
)
// Request is the context object for a request.

View File

@ -11,7 +11,7 @@ import (
"net/http"
"strings"
"github.com/gogf/gf/encoding/gbase64"
"github.com/gogf/gf/v2/encoding/gbase64"
)
// BasicAuth enables the http basic authentication feature with given passport and password

View File

@ -7,12 +7,12 @@
package ghttp
import (
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"net/http"
"reflect"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/util/gutil"
)
// middleware is the plugin for request workflow management.

View File

@ -9,18 +9,18 @@ package ghttp
import (
"bytes"
"fmt"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/encoding/gurl"
"github.com/gogf/gf/encoding/gxml"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gurl"
"github.com/gogf/gf/v2/encoding/gxml"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gvalid"
"io/ioutil"
"mime/multipart"
"reflect"

View File

@ -8,7 +8,7 @@ package ghttp
import (
"context"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/v2/container/gvar"
)
// RequestFromCtx retrieves and returns the Request object from context.

View File

@ -8,12 +8,12 @@ package ghttp
import (
"context"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/util/grand"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/grand"
"io"
"mime/multipart"
"strconv"

View File

@ -7,8 +7,8 @@
package ghttp
import (
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/util/gconv"
)
// SetForm sets custom form value with key-value pair.

View File

@ -8,9 +8,9 @@ package ghttp
import (
"fmt"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gpage"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gpage"
)
// GetPage creates and returns the pagination object for given <totalSize> and <pageSize>.

View File

@ -6,7 +6,7 @@
package ghttp
import "github.com/gogf/gf/container/gvar"
import "github.com/gogf/gf/v2/container/gvar"
// SetParam sets custom parameter with key-value pair.
func (r *Request) SetParam(key string, value interface{}) {

View File

@ -7,9 +7,9 @@
package ghttp
import (
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/util/gconv"
)
// SetQuery sets custom query value with key-value pair.

View File

@ -7,11 +7,11 @@
package ghttp
import (
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/internal/empty"
"github.com/gogf/gf/internal/structs"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/internal/structs"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
)
// GetRequest retrieves and returns the parameter named <key> passed from client and

View File

@ -6,7 +6,7 @@
package ghttp
import "github.com/gogf/gf/container/gvar"
import "github.com/gogf/gf/v2/container/gvar"
// GetRouterMap retrieves and returns a copy of router map.
func (r *Request) GetRouterMap() map[string]string {

View File

@ -6,7 +6,7 @@
package ghttp
import "github.com/gogf/gf/os/gview"
import "github.com/gogf/gf/v2/os/gview"
// SetView sets template view engine object for this request.
func (r *Request) SetView(view *gview.View) {

View File

@ -12,9 +12,9 @@ import (
"fmt"
"net/http"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/os/gfile"
)
// Response is the http response manager.

View File

@ -8,8 +8,8 @@
package ghttp
import (
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"net/http"
"net/url"
)

View File

@ -8,11 +8,11 @@
package ghttp
import (
"github.com/gogf/gf/os/gcfg"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gmode"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/os/gcfg"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gmode"
"github.com/gogf/gf/v2/util/gutil"
)
// WriteTpl parses and responses given template file.

View File

@ -9,9 +9,9 @@ package ghttp
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/util/gconv"
"net/http"
)

View File

@ -10,31 +10,31 @@ import (
"bytes"
"context"
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/net/ghttp/internal/swaggerui"
"github.com/gogf/gf/protocol/goai"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/net/ghttp/internal/swaggerui"
"github.com/gogf/gf/v2/protocol/goai"
"github.com/gogf/gf/v2/text/gstr"
"net/http"
"os"
"runtime"
"strings"
"time"
"github.com/gogf/gf/os/gsession"
"github.com/gogf/gf/v2/os/gsession"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/os/gcache"
"github.com/gogf/gf/os/genv"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/container/garray"
"github.com/gogf/gf/v2/container/gtype"
"github.com/gogf/gf/v2/os/gcache"
"github.com/gogf/gf/v2/os/genv"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/os/gtimer"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/util/gconv"
"github.com/olekukonko/tablewriter"
)

View File

@ -8,13 +8,13 @@ package ghttp
import (
"context"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/os/gfile"
"strings"
"time"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/os/gtimer"
"github.com/gogf/gf/v2/os/gview"
)
// utilAdmin is the controller for administration.

View File

@ -10,23 +10,23 @@ import (
"bytes"
"context"
"fmt"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/text/gstr"
"os"
"runtime"
"strings"
"sync"
"time"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/container/gtype"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gtimer"
"github.com/gogf/gf/v2/util/gconv"
)
const (

View File

@ -10,7 +10,7 @@ package ghttp
import (
"context"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/internal/intlog"
"os"
"os/signal"
"syscall"

View File

@ -9,21 +9,21 @@ package ghttp
import (
"context"
"crypto/tls"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/v2/util/gutil"
"net/http"
"strconv"
"time"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/os/gsession"
"github.com/gogf/gf/v2/os/gsession"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/glog"
)
const (

View File

@ -6,7 +6,7 @@
package ghttp
import "github.com/gogf/gf/os/glog"
import "github.com/gogf/gf/v2/os/glog"
// SetLogPath sets the log path for server.
// It logs content to file only if the log path is set.

View File

@ -9,7 +9,7 @@ package ghttp
import (
"time"
"github.com/gogf/gf/os/gsession"
"github.com/gogf/gf/v2/os/gsession"
)
// SetSessionMaxAge sets the SessionMaxAge for server.

View File

@ -12,11 +12,11 @@ import (
"context"
"strings"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/container/garray"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/util/gconv"
)
// staticPathItem is the item struct for static path configuration.

View File

@ -7,7 +7,7 @@
package ghttp
import (
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/v2/container/gvar"
"net/http"
"time"
)

View File

@ -9,7 +9,7 @@ package ghttp
import (
"bytes"
"context"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/os/glog"
)
// errorLogger is the error logging logger for underlying net/http.Server.

View File

@ -9,11 +9,11 @@ package ghttp
import (
"context"
"crypto/tls"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/os/gproc"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/v2/text/gstr"
"log"
"net"
"net/http"

View File

@ -7,23 +7,23 @@
package ghttp
import (
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/internal/intlog"
"net/http"
"os"
"sort"
"strings"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/os/gres"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/encoding/ghtml"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/gspath"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/encoding/ghtml"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gspath"
"github.com/gogf/gf/v2/os/gtime"
)
// ServeHTTP is the default handler for http request.

View File

@ -8,7 +8,7 @@ package ghttp
import (
"fmt"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/errors/gerror"
)
// handleAccessLog handles the access logging for server.

View File

@ -8,9 +8,9 @@ package ghttp
import (
"context"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/protocol/goai"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/protocol/goai"
"github.com/gogf/gf/v2/text/gstr"
)
// initOpenApi generates api specification using OpenApiV3 protocol.

View File

@ -7,12 +7,12 @@
package ghttp
import (
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/internal/intlog"
netpprof "net/http/pprof"
runpprof "runtime/pprof"
"strings"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/v2/os/gview"
)
// utilPProf is the PProf interface implementer.

View File

@ -9,16 +9,16 @@ package ghttp
import (
"context"
"fmt"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/container/gtype"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"strings"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/container/glist"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
)
const (

View File

@ -9,13 +9,13 @@ package ghttp
import (
"context"
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
"reflect"
"strings"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/util/gconv"
)
type (

View File

@ -8,7 +8,7 @@ package ghttp
import (
"context"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
"net/http"
"reflect"
)

View File

@ -8,7 +8,7 @@ package ghttp
import (
"context"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
"reflect"
)

View File

@ -8,14 +8,14 @@ package ghttp
import (
"fmt"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/internal/json"
"strings"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/v2/container/glist"
"github.com/gogf/gf/v2/text/gregex"
)
// handlerCacheItem is an item just for internal router searching cache.

View File

@ -9,13 +9,13 @@ package ghttp
import (
"bytes"
"context"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"reflect"
"strings"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/text/gstr"
)
// BindHandler registers a handler function to server with given pattern.

View File

@ -12,9 +12,9 @@ import (
"reflect"
"strings"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
)
// BindObject registers object to server routes with given pattern.

View File

@ -6,7 +6,7 @@
package ghttp
import "github.com/gogf/gf/os/gsession"
import "github.com/gogf/gf/v2/os/gsession"
// Session is actually a alias of gsession.Session,
// which is bound to a single request.

View File

@ -7,8 +7,8 @@
package ghttp
import (
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/text/gstr"
)
const (

View File

@ -11,10 +11,10 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/text/gstr"
)
func Test_Client_Request_13_Dump(t *testing.T) {

View File

@ -15,14 +15,14 @@ import (
"testing"
"time"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/util/guid"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/util/guid"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Client_Basic(t *testing.T) {

View File

@ -8,18 +8,18 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"testing"
"time"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_ConfigFromMap(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Context(t *testing.T) {

View File

@ -12,9 +12,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Cookie(t *testing.T) {

View File

@ -10,14 +10,14 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/net/ghttp"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Error_Code(t *testing.T) {

View File

@ -8,18 +8,18 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
_ "github.com/gogf/gf/net/ghttp/testdata/https/packed"
_ "github.com/gogf/gf/v2/net/ghttp/testdata/https/packed"
)
func Test_HTTPS_Basic(t *testing.T) {

View File

@ -8,8 +8,8 @@ package ghttp_test
import (
"context"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/os/genv"
"github.com/gogf/gf/v2/container/garray"
"github.com/gogf/gf/v2/os/genv"
)
var (

View File

@ -13,9 +13,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func TestRequest_GetRemoteIp(t *testing.T) {

View File

@ -10,15 +10,15 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Log(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_GetUrl(t *testing.T) {

View File

@ -8,15 +8,15 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/container/garray"
"github.com/gogf/gf/v2/debug/gdebug"
"net/http"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_BindMiddleware_Basic1(t *testing.T) {

View File

@ -8,9 +8,9 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
"testing"
"time"
)

View File

@ -9,15 +9,15 @@ package ghttp_test
import (
"context"
"fmt"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gmeta"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gmeta"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_OpenApi_Swagger(t *testing.T) {

View File

@ -13,8 +13,8 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
. "github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
. "github.com/gogf/gf/v2/test/gtest"
)
func TestServer_EnablePProf(t *testing.T) {

View File

@ -9,9 +9,9 @@ package ghttp_test
import (
"context"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
"testing"
"time"
)

View File

@ -8,16 +8,16 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_File_Single(t *testing.T) {

View File

@ -8,13 +8,13 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/v2/internal/json"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_Json_Request(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_Page(t *testing.T) {

View File

@ -11,11 +11,11 @@ import (
"testing"
"time"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/util/gvalid"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_Parse(t *testing.T) {

View File

@ -13,11 +13,11 @@ import (
"testing"
"time"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_Basic(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Params_Xml_Request(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Basic1(t *testing.T) {

View File

@ -8,13 +8,13 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/internal/intlog"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_DomainBasic(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type DomainObjectRest struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type DomainObject struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Exit(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Group_Group(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Group_Hook1(t *testing.T) {

View File

@ -12,9 +12,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type GroupObjRest struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
// 执行对象

View File

@ -9,13 +9,13 @@ package ghttp_test
import (
"context"
"fmt"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/v2/errors/gerror"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Handler_Extended_Handler_WithObject(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Router_Hook_Basic(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type NamesObject struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type ObjectRest struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type ObjectRest2 struct{}

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type Object struct{}

View File

@ -12,9 +12,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
type testWrapStdHTTPStruct struct {

View File

@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Session_Cookie(t *testing.T) {

View File

@ -10,15 +10,15 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
"testing"
"time"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Static_ServerRoot(t *testing.T) {

View File

@ -13,9 +13,9 @@ import (
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_StatusHandler(t *testing.T) {

View File

@ -10,15 +10,15 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/encoding/ghtml"
"github.com/gogf/gf/os/gview"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/encoding/ghtml"
"github.com/gogf/gf/v2/os/gview"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_Template_Basic(t *testing.T) {

View File

@ -14,9 +14,9 @@ import (
"github.com/gorilla/websocket"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_WebSocketClient(t *testing.T) {

View File

@ -13,9 +13,9 @@ import (
"github.com/gorilla/websocket"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_WebSocket(t *testing.T) {

View File

@ -9,7 +9,7 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func ExampleClient_Header() {

View File

@ -10,7 +10,7 @@ import (
"context"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func ExampleClient_Get() {

View File

@ -7,8 +7,8 @@
package ghttp_test
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"time"
)

View File

@ -8,7 +8,7 @@ package ghttp_test
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func ExampleClient_Post() {

View File

@ -9,9 +9,9 @@ package ghttp_test
import (
"context"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gfile"
"time"
)

View File

@ -11,11 +11,11 @@ import (
"crypto/rand"
"crypto/tls"
"fmt"
"github.com/gogf/gf"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/text/gstr"
"golang.org/x/net/proxy"
"net"
"net/http"
@ -24,7 +24,7 @@ import (
"strings"
"time"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/v2/text/gregex"
)
// Client is the HTTP client for HTTP request management.

View File

@ -8,7 +8,7 @@ package client
import (
"context"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/v2/internal/intlog"
)
// GetBytes sends a GET request, retrieves and returns the result content as bytes.

View File

@ -8,7 +8,7 @@ package client
import (
"fmt"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/v2/internal/utils"
"io/ioutil"
"net/http"
"net/http/httputil"

View File

@ -9,13 +9,13 @@ package client
import (
"bytes"
"context"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/internal/intlog"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/net/ghttp/internal/httputil"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/net/ghttp/internal/httputil"
"io"
"io/ioutil"
"mime/multipart"
@ -24,11 +24,11 @@ import (
"strings"
"time"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/os/gfile"
)
// Get send GET request and returns the response object.

View File

@ -12,12 +12,12 @@ import (
"net/http"
"net/http/httptrace"
"github.com/gogf/gf"
"github.com/gogf/gf/internal/utils"
"github.com/gogf/gf/net/ghttp/internal/httputil"
"github.com/gogf/gf/net/gtrace"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/net/ghttp/internal/httputil"
"github.com/gogf/gf/v2/net/gtrace"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
@ -26,7 +26,7 @@ import (
)
const (
tracingInstrumentName = "github.com/gogf/gf/net/ghttp.Client"
tracingInstrumentName = "github.com/gogf/gf/v2/net/ghttp.Client"
tracingAttrHttpAddressRemote = "http.address.remote"
tracingAttrHttpAddressLocal = "http.address.local"
tracingAttrHttpDnsStart = "http.dns.start"

Some files were not shown because too many files have changed in this diff Show More