github.com/guyezi/gofrontend@v0.0.0-20200228202240-7a62a49e62c0/libgo/go/net/http/roundtrip.go (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build !js !wasm
     6  
     7  package http
     8  
     9  // RoundTrip implements the RoundTripper interface.
    10  //
    11  // For higher-level HTTP client support (such as handling of cookies
    12  // and redirects), see Get, Post, and the Client type.
    13  //
    14  // Like the RoundTripper interface, the error types returned
    15  // by RoundTrip are unspecified.
    16  func (t *Transport) RoundTrip(req *Request) (*Response, error) {
    17  	return t.roundTrip(req)
    18  }