_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c13200 | // Dial defines the maximum amount of time waiting for network dialing | |
c13201 | // All defines all the timeout types for the outgoing request | |
c13202 | // NewRequest creates a new Request entity. | |
c13203 | // SetClient Attach a client to the current Request
// This is mostly done internally. | |
c13204 | // Mux is a middleware multiplexer for easy plugin composition. | |
c13205 | // Method defines the HTTP verb to be used. | |
c13206 | // URL parses and defines the URL to be used in the outgoing request. | |
c13207 | // BaseURL parses the given URL and uses the URL schema and host in the outgoing request. | |
c13208 | // Path defines the request URL path to be used in the outgoing request. | |
c13209 | // AddPath defines the request URL path to be used in the outgoing request. | |
c13210 | // SetQuery sets a new URL query param field.
// If another query param exists with the same key, it will be overwritten. | |
c13211 | // AddQuery adds a new URL query param field
// without overwriting any existent query field. | |
c13212 | // SetQueryParams sets URL query params based on the given map. | |
c13213 | // DelHeader deletes a header field by its name | |
c13214 | // Body defines the request body based on a io.Reader stream. | |
c13215 | // BodyString defines the request body based on the given string.
// If using this method, you should define the proper Content-Type header
// representing the real content MIME type. | |
c13216 | // JSON serializes and defines as request body based on the given input.
// The proper Content-Type header will be transparently added for you. | |
c13217 | // XML serializes and defines the request body based on the given input.
// The proper Content-Type header will be transparently added for you. | |
c13218 | // Do performs the HTTP request and returns the HTTP response. | |
c13219 | // Use uses a new plugin in the middleware stack. | |
c13220 | // UseRequest uses a request middleware handler. | |
c13221 | // UseResponse uses a response middleware handler. | |
c13222 | // UseError uses an error middleware handler. | |
c13223 | // UseHandler uses an new middleware handler for the given phase. | |
c13224 | // Clone creates a new side-effects free Request based on the current one. | |
c13225 | // NewDefaultTransport returns a new http.Transport with default values
// based on the given net.Dialer. | |
c13226 | // Basic defines an authorization basic header in the outgoing request | |
c13227 | // Bearer defines an authorization bearer token header in the outgoing request | |
c13228 | // Custom defines a custom authorization header field in the outgoing request | |
c13229 | // Disable disables the authorization basic header in the outgoing request | |
c13230 | // Add adds a cookie to the request. Per RFC 6265 section 5.4, AddCookie does not
// attach more than one Cookie header field.
// That means all cookies, if any, are written into the same line, separated by semicolon. | |
c13231 | // Set sets a new cookie field by key and value. | |
c13232 | // SetMap sets a map of cookies represented by key-value pair. | |
c13233 | // AddMultiple adds a list of cookies. | |
c13234 | // Jar creates a cookie jar to store HTTP cookies when they are sent down. | |
c13235 | // Set sets a new HTTP transport for the outgoing request | |
c13236 | // Config defines the request TLS connection config | |
c13237 | // Config defines in the request http.Client the redirect
// policy based on the given options. | |
c13238 | // Limit defines in the maximum number of redirects that http.Client should follow. | |
c13239 | // Error reports an error and stops the middleware call chain | |
c13240 | // Stop stops the middleware call chain with a custom Context | |
c13241 | // once returns a function that can be executed once
// Subsequent calls will be no-op | |
c13242 | // Set defines the proxy servers to be used based on the transport scheme | |
c13243 | // Request creates a new Request based on the current Client | |
c13244 | // Get creates a new GET request. | |
c13245 | // Post creates a new POST request. | |
c13246 | // Put creates a new PUT request. | |
c13247 | // Delete creates a new DELETE request. | |
c13248 | // Patch creates a new PATCH request. | |
c13249 | // Head creates a new HEAD request. | |
c13250 | // Method defines a the default HTTP method used by outgoing client requests. | |
c13251 | // URL defines the URL for client requests.
// Useful to define at client level the base URL and base path used by child requests. | |
c13252 | // BaseURL defines the URL schema and host for client requests.
// Useful to define at client level the base URL used by client child requests. | |
c13253 | // Path defines the URL base path for client requests. | |
c13254 | // Use uses a new plugin to the middleware stack. | |
c13255 | // UseRequest uses a new middleware function for request phase. | |
c13256 | // UseResponse uses a new middleware function for response phase. | |
c13257 | // UseError uses a new middleware function for error phase. | |
c13258 | // UseHandler uses a new middleware function for the given phase. | |
c13259 | // UseParent uses another Client as parent
// inheriting its middleware stack and configuration. | |
c13260 | // File creates a new multipart form based on a unique file field
// from the given io.ReadCloser stream. | |
c13261 | // Files creates a multipart form based on files fields. | |
c13262 | // Data creates custom form based on the given form data
// who can have files and string based fields. | |
c13263 | // SetHandler uses a new handler function for the given middleware phase. | |
c13264 | // Exec executes the plugin handler for the given middleware phase passing the given context. | |
c13265 | // NewPhasePlugin creates a new plugin layer
// to handle a given middleware phase. | |
c13266 | // ReplyWithStatus helper to write the http.Response status code and text. | |
c13267 | // WriteBodyString writes a string based body in a given http.Response. | |
c13268 | // StringReader creates an io.ReadCloser interface from a string. | |
c13269 | // SetMap sets a map of headers represented by key-value pair. | |
c13270 | // Set sets the Content Type header value, optionally based on a MIME type alias. | |
c13271 | // New creates an empty default Context | |
c13272 | // getStore retrieves the current request context data store. | |
c13273 | // Set sets a value on the current store | |
c13274 | // Get gets a value by key in the current or parent context | |
c13275 | // GetInt gets an int context value from req.
// Returns an empty string if key not found in the request context,
// or the value does not evaluate to a string | |
c13276 | // GetString gets a string context value from req.
// Returns an empty string if key not found in the request context,
// or the value does not evaluate to a string | |
c13277 | // GetAll returns all stored context values for a request.
// Will always return a valid map. Returns an empty map for
// requests context data previously set | |
c13278 | // Root returns the root Context looking in the parent contexts recursively.
// If the current context has no parent context, it will return the Context itself. | |
c13279 | // SetRequest replaces the context http.Request | |
c13280 | // Clone returns a clone of the current context. | |
c13281 | // CopyTo copies the current context store into a new Context. | |
c13282 | // createRequest creates a default http.Request instance. | |
c13283 | // createResponse creates a default http.Response instance. | |
c13284 | // Set sets the query param key and value.
// It replaces any existing values. | |
c13285 | // DelAll deletes all the query params. | |
c13286 | // SetMap sets a map of query params by key-value pair. | |
c13287 | // Close is part of our ability to support io.ReadCloser if
// someone wants to make use of the raw body. | |
c13288 | // XML is a method that will populate a struct that is provided
// `userStruct` with the XML returned within the response body. | |
c13289 | // Bytes returns the response as a byte array. | |
c13290 | // String returns the response as a string. | |
c13291 | // isChunkedResponse iterates over the response's transfer encodings
// and returns either true whether 'chunked' is found, or false, otherwise. | |
c13292 | // sendSSF sends a whole span to an SSF receiver. | |
c13293 | // sendStatsd sends the metrics gathered in a span to a dogstatsd
// endpoint. | |
c13294 | // SetPutObject sets the function that acts as the PutObject handler | |
c13295 | // SendSync on a streamBackend attempts to write the packet on the
// connection to the upstream veneur directly. If it encounters a
// protocol error, SendSync will return the original protocol error once
// the connection is re-established. | |
c13296 | // FlushSync on a streamBackend flushes the buffer if one exists. If the
// connection was disconnected prior to flushing, FlushSync re-establishes
// it and discards the buffer. | |
c13297 | // handleImport generates the handler that responds to POST requests submitting
// metrics to the global veneur instance. | |
c13298 | // nonEmpty returns true if there is at least one non-empty
// metric | |
c13299 | // RouteTo returns true if the named sink should receive a metric
// according to the route table. A nil route table causes any sink to
// be eligible for the metric. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.