Packages

case class HttpModel(name: String, url: String, method: String, headersFieldName: Option[String], valueFieldsNames: List[String], compression: HttpCompression, mediaType: String, logBody: Boolean, structured: Boolean = true) extends DatastoreModel with Product with Serializable

The HttpModel used by HttpWriter to send data with HTTP protocol

name

The httpModel name

url

The url to send the request to

method

The HTTP methods: GET, POST, PUT, PATCH, DELETE

headersFieldName

The name of the DataFrame column to be used as http headers, it must be of type Map[String,String], if None, no header will be sent in the request, except for the content-type and content-encoding ones

valueFieldsNames

The list of DataFrame columns to be rendered as json in the http request body. If the passed list is empty, all the fields, except the headers field (if any) will be rendered as a json object. If there is only one field, the behaviour is controlled by the structured field

compression

The HttpCompression

mediaType

The format of the request content

logBody

It enable the request body logger

structured

Indicates how the request body will be rendered. The effect of this configuration has effect only if the DataFrame contains only one column to be sent and only if it is of ArrayType or MapType. If structured is true the array or map will always be enclosed in a json object, otherwise the map or the array will be at the top level of the json document. Input dataframe:

+---------+
|  values |
+---------+
|[3, 4, 5]|
+---------+

Request with structured = true

{"values" : [3, 4, 5]}

Request with structured = false

[3, 4, 5]
Linear Supertypes
Serializable, Serializable, Product, Equals, DatastoreModel, Model, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpModel
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. DatastoreModel
  7. Model
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpModel(name: String, url: String, method: String, headersFieldName: Option[String], valueFieldsNames: List[String], compression: HttpCompression, mediaType: String, logBody: Boolean, structured: Boolean = true)

    name

    The httpModel name

    url

    The url to send the request to

    method

    The HTTP methods: GET, POST, PUT, PATCH, DELETE

    headersFieldName

    The name of the DataFrame column to be used as http headers, it must be of type Map[String,String], if None, no header will be sent in the request, except for the content-type and content-encoding ones

    valueFieldsNames

    The list of DataFrame columns to be rendered as json in the http request body. If the passed list is empty, all the fields, except the headers field (if any) will be rendered as a json object. If there is only one field, the behaviour is controlled by the structured field

    compression

    The HttpCompression

    mediaType

    The format of the request content

    logBody

    It enable the request body logger

    structured

    Indicates how the request body will be rendered. The effect of this configuration has effect only if the DataFrame contains only one column to be sent and only if it is of ArrayType or MapType. If structured is true the array or map will always be enclosed in a json object, otherwise the map or the array will be at the top level of the json document. Input dataframe:

    +---------+
    |  values |
    +---------+
    |[3, 4, 5]|
    +---------+

    Request with structured = true

    {"values" : [3, 4, 5]}

    Request with structured = false

    [3, 4, 5]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val compression: HttpCompression
  7. def datastoreProduct: DatastoreProduct
    Definition Classes
    HttpModelDatastoreModel
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. val headersFieldName: Option[String]
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val logBody: Boolean
  14. val mediaType: String
  15. val method: String
  16. val name: String
    Definition Classes
    HttpModelModel
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val structured: Boolean
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. val url: String
  23. val valueFieldsNames: List[String]
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DatastoreModel

Inherited from Model

Inherited from AnyRef

Inherited from Any

Ungrouped