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]
- Alphabetic
- By Inheritance
- HttpModel
- Serializable
- Serializable
- Product
- Equals
- DatastoreModel
- Model
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val compression: HttpCompression
-
def
datastoreProduct: DatastoreProduct
- Definition Classes
- HttpModel → DatastoreModel
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val headersFieldName: Option[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logBody: Boolean
- val mediaType: String
- val method: String
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val structured: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val url: String
- val valueFieldsNames: List[String]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()