Method: Google::Cloud::Monitoring::V3::UptimeCheckConfig::HttpCheck#content_type

Defined in:
proto_docs/google/monitoring/v3/uptime.rb

#content_type::Google::Cloud::Monitoring::V3::UptimeCheckConfig::HttpCheck::ContentType

Returns The content type header to use for the check. The following configurations result in errors:

  1. Content type is specified in both the headers field and the content_type field.
  2. Request method is GET and content_type is not TYPE_UNSPECIFIED
  3. Request method is POST and content_type is TYPE_UNSPECIFIED.
  4. Request method is POST and a "Content-Type" header is provided via headers field. The content_type field should be used instead.

Returns:

  • (::Google::Cloud::Monitoring::V3::UptimeCheckConfig::HttpCheck::ContentType)

    The content type header to use for the check. The following configurations result in errors:

    1. Content type is specified in both the headers field and the content_type field.
    2. Request method is GET and content_type is not TYPE_UNSPECIFIED
    3. Request method is POST and content_type is TYPE_UNSPECIFIED.
    4. Request method is POST and a "Content-Type" header is provided via headers field. The content_type field should be used instead.
[View source]

245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'proto_docs/google/monitoring/v3/uptime.rb', line 245

class HttpCheck
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The authentication parameters to provide to the specified resource or
  # URL that requires a username and password. Currently, only
  # [Basic HTTP authentication](https://tools.ietf.org/html/rfc7617) is
  # supported in Uptime checks.
  # @!attribute [rw] username
  #   @return [::String]
  #     The username to use when authenticating with the HTTP server.
  # @!attribute [rw] password
  #   @return [::String]
  #     The password to use when authenticating with the HTTP server.
  class BasicAuthentication
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class HeadersEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The HTTP request method options.
  module RequestMethod
    # No request method specified.
    METHOD_UNSPECIFIED = 0

    # GET request.
    GET = 1

    # POST request.
    POST = 2
  end

  # Header options corresponding to the content type of a HTTP request body.
  module ContentType
    # No content type specified.
    TYPE_UNSPECIFIED = 0

    # `body` is in URL-encoded form. Equivalent to setting the `Content-Type`
    # to `application/x-www-form-urlencoded` in the HTTP request.
    URL_ENCODED = 1
  end
end