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