Class/Object

org.springframework.scala.web.client

RestTemplate

Related Docs: object RestTemplate | package client

Permalink

class RestTemplate extends AnyRef

Scala-based convenience wrapper for the Spring org.springframework.web.client.RestTemplate, taking advantage of functions and Scala types.

Since

1.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RestTemplate
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RestTemplate(requestFactory: ClientHttpRequestFactory)

    Permalink

    Create a new instance of the RestTemplate given the ClientHttpRequestFactory to obtain requests from

    Create a new instance of the RestTemplate given the ClientHttpRequestFactory to obtain requests from

    requestFactory

    HTTP request factory to use

  2. new RestTemplate(javaTemplate: RestOperations = ...)

    Permalink

    Creates a RestTemplate that wraps the given Java template, defaulting to the standard RestTemplate

    Creates a RestTemplate that wraps the given Java template, defaulting to the standard RestTemplate

    javaTemplate

    the Java RestTemplate to wrap

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def delete(url: URI): Unit

    Permalink

    Delete the resources at the specified URL.

    Delete the resources at the specified URL.

    url

    the URL

  7. def delete(url: String, uriVariables: Map[String, _]): Unit

    Permalink

    Delete the resources at the specified URI.

    Delete the resources at the specified URI.

    URI Template variables are expanded using the given map.

    url

    the URL

    uriVariables

    the variables to expand the template

  8. def delete(url: String, uriVariables: Any*): Unit

    Permalink

    Delete the resources at the specified URI.

    Delete the resources at the specified URI.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    uriVariables

    the variables to expand in the template

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def exchange[T](url: URI, method: HttpMethod, requestEntity: Option[HttpEntity[_]])(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    requestEntity

    the entity (headers and/or body) to write to the request

    returns

    the response as entity

  12. def exchange[T](url: String, method: HttpMethod, requestEntity: Option[HttpEntity[_]], uriVariables: Map[String, _])(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    URI Template variables are expanded using the given URI variables.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    requestEntity

    the entity (headers and/or body) to write to the request

    uriVariables

    the variables to expand in the template

    returns

    the response as entity

    Since

    3.0.2

  13. def exchange[T](url: String, method: HttpMethod, requestEntity: Option[HttpEntity[_]], uriVariables: Any*)(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    requestEntity

    the entity (headers and/or body) to write to the request

    uriVariables

    the variables to expand in the template

    returns

    the response as entity

  14. def execute[T](url: URI, method: HttpMethod)(requestFunction: (ClientHttpRequest) ⇒ Unit)(responseFunction: (ClientHttpResponse) ⇒ T): Option[T]

    Permalink

    Execute the HTTP method to the given URL, preparing the request with the given function, and reading the response with a function.

    Execute the HTTP method to the given URL, preparing the request with the given function, and reading the response with a function.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    requestFunction

    function that prepares the request

    responseFunction

    function that extracts the return value from the response

    returns

    an arbitrary object, as returned by the response object

  15. def execute[T](url: String, method: HttpMethod, uriVariables: Map[String, _])(requestFunction: (ClientHttpRequest) ⇒ Unit)(responseFunction: (ClientHttpResponse) ⇒ T): Option[T]

    Permalink

    Execute the HTTP method to the given URI template, preparing the request with the given function, and reading the response with a function

    Execute the HTTP method to the given URI template, preparing the request with the given function, and reading the response with a function

    URI Template variables are expanded using the given URI variables map.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    uriVariables

    the variables to expand in the template

    requestFunction

    function that prepares the request

    responseFunction

    function that extracts the return value from the response

    returns

    an arbitrary object, as returned by the response function

  16. def execute[T](url: String, method: HttpMethod, uriVariables: Any*)(requestFunction: (ClientHttpRequest) ⇒ Unit)(responseFunction: (ClientHttpResponse) ⇒ T): Option[T]

    Permalink

    Execute the HTTP method to the given URI template, preparing the request with the given function, and reading the response with a function.

    Execute the HTTP method to the given URI template, preparing the request with the given function, and reading the response with a function.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    method

    the HTTP method (GET, POST, etc)

    uriVariables

    the variables to expand in the template

    requestFunction

    function that prepares the request

    responseFunction

    function that extracts the return value from the response

    returns

    an arbitrary object, as returned by the response function

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getForAny[T](url: URI)(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Retrieve a representation by doing a GET on the URL.

    Retrieve a representation by doing a GET on the URL. The response (if any) is converted and returned.

    url

    the URL

    returns

    the converted object

  20. def getForAny[T](url: String, uriVariables: Map[String, _])(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Retrieve a representation by doing a GET on the URI template.

    Retrieve a representation by doing a GET on the URI template. The response (if any) is converted and returned.

    URI Template variables are expanded using the given map.

    url

    the URL

    uriVariables

    the map containing variables for the URI template

    returns

    the converted object

  21. def getForAny[T](url: String, uriVariables: Any*)(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Retrieve a representation by doing a GET on the specified URL.

    Retrieve a representation by doing a GET on the specified URL. The response (if any) is converted and returned.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    uriVariables

    the variables to expand the template

    returns

    the converted object

  22. def getForEntity[T](url: URI)(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Retrieve a representation by doing a GET on the URL .

    Retrieve a representation by doing a GET on the URL . The response is converted and stored in an org.springframework.http.ResponseEntity}.

    url

    the URL

    returns

    the converted object

  23. def getForEntity[T](url: String, uriVariables: Map[String, _])(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Retrieve a representation by doing a GET on the URL.

    Retrieve a representation by doing a GET on the URL. The response is converted and stored in an org.springframework.http.ResponseEntity.

    URI Template variables are expanded using the given map.

    url

    the URL

    uriVariables

    the map containing variables for the URI template

    returns

    the converted object

  24. def getForEntity[T](url: String, uriVariables: Any*)(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Retrieve an entity by doing a GET on the specified URL.

    Retrieve an entity by doing a GET on the specified URL. The response is converted and stored in an ResponseEntity.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    uriVariables

    the variables to expand the template

    returns

    the entity

  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. def headForHeaders(url: URI): HttpHeaders

    Permalink

    Retrieve all headers of the resource specified by the URL.

    Retrieve all headers of the resource specified by the URL.

    url

    the URL

    returns

    all HTTP headers of that resource

  27. def headForHeaders(url: String, uriVariables: Map[String, _]): HttpHeaders

    Permalink

    Retrieve all headers of the resource specified by the URI template.

    Retrieve all headers of the resource specified by the URI template.

    URI Template variables are expanded using the given map.

    url

    the URL

    uriVariables

    the map containing variables for the URI template

    returns

    all HTTP headers of that resource

  28. def headForHeaders(url: String, uriVariables: Any*): HttpHeaders

    Permalink

    Retrieve all headers of the resource specified by the URI template.

    Retrieve all headers of the resource specified by the URI template.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    uriVariables

    the variables to expand the template

    returns

    all HTTP headers of that resource

  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. val javaTemplate: RestOperations

    Permalink

    the Java RestTemplate to wrap

  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. def optionsForAllow(url: URI): Set[HttpMethod]

    Permalink

    Return the value of the Allow header for the given URL.

    Return the value of the Allow header for the given URL.

    url

    the URL

    returns

    the value of the allow header

  35. def optionsForAllow(url: String, uriVariables: Map[String, _]): Set[HttpMethod]

    Permalink

    Return the value of the Allow header for the given URI.

    Return the value of the Allow header for the given URI.

    URI Template variables are expanded using the given map.

    url

    the URL

    uriVariables

    the variables to expand in the template

    returns

    the value of the allow header

  36. def optionsForAllow(url: String, uriVariables: Any*): Set[HttpMethod]

    Permalink

    Return the value of the Allow header for the given URI.

    Return the value of the Allow header for the given URI.

    URI Template variables are expanded using the given URI variables, if any.

    url

    the URL

    uriVariables

    the variables to expand in the template

    returns

    the value of the allow header

  37. def postForEntity[T](url: URI, request: Option[Any])(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Create a new resource by POSTing the given object to the URL, and returns the response as org.springframework.http.ResponseEntity.

    Create a new resource by POSTing the given object to the URL, and returns the response as org.springframework.http.ResponseEntity.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed, may be null

    returns

    the converted object

    Since

    3.0.2

    See also

    HttpEntity

  38. def postForEntity[T](url: String, request: Option[Any], uriVariables: Map[String, _])(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the response as org.springframework.http.HttpEntity.

    Create a new resource by POSTing the given object to the URI template, and returns the response as org.springframework.http.HttpEntity.

    URI Template variables are expanded using the given map.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    uriVariables

    the variables to expand the template

    returns

    the converted object

    See also

    HttpEntity

  39. def postForEntity[T](url: String, request: Option[Any], uriVariables: Any*)(implicit arg0: ClassTag[T]): ResponseEntity[T]

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the response as org.springframework.http.ResponseEntity.

    Create a new resource by POSTing the given object to the URI template, and returns the response as org.springframework.http.ResponseEntity.

    URI Template variables are expanded using the given URI variables, if any.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    uriVariables

    the variables to expand the template

    returns

    the converted object

    See also

    HttpEntity

  40. def postForLocation(url: URI, request: Option[Any]): URI

    Permalink

    Create a new resource by POSTing the given object to the URL, and returns the value of the Location header.

    Create a new resource by POSTing the given object to the URL, and returns the value of the Location header. This header typically indicates where the new resource is stored.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    returns

    the value for the Location header

    See also

    HttpEntity

  41. def postForLocation(url: String, request: Option[Any], uriVariables: Map[String, _]): URI

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header.

    Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header. This header typically indicates where the new resource is stored.

    URI Template variables are expanded using the given map.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    uriVariables

    the variables to expand the template

    returns

    the value for the Location header

    See also

    HttpEntity

  42. def postForLocation(url: String, request: Option[Any], uriVariables: Any*): URI

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header.

    Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header. This header typically indicates where the new resource is stored.

    URI Template variables are expanded using the given URI variables, if any.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    uriVariables

    the variables to expand the template

    returns

    the value for the Location header

    See also

    HttpEntity

  43. def postForObject[T](url: URI, request: Option[Any])(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Create a new resource by POSTing the given object to the URL, and returns the representation found in the response.

    Create a new resource by POSTing the given object to the URL, and returns the representation found in the response.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    returns

    the converted object

    See also

    HttpEntity

  44. def postForObject[T](url: String, request: Option[Any], uriVariables: Map[String, _])(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.

    Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.

    URI Template variables are expanded using the given map.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed, may be null

    uriVariables

    the variables to expand the template

    returns

    the converted object

    See also

    HttpEntity

  45. def postForObject[T](url: String, request: Option[Any], uriVariables: Any*)(implicit arg0: ClassTag[T]): Option[T]

    Permalink

    Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.

    Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.

    URI Template variables are expanded using the given URI variables, if any.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be POSTed

    uriVariables

    the variables to expand the template

    returns

    the converted object

    See also

    HttpEntity

  46. def put(url: URI, request: Option[Any]): Unit

    Permalink

    Creates a new resource by PUTting the given object to URL.

    Creates a new resource by PUTting the given object to URL.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be PUT

    See also

    HttpEntity

  47. def put(url: String, request: Option[Any], uriVariables: Map[String, _]): Unit

    Permalink

    Creates a new resource by PUTting the given object to URI template.

    Creates a new resource by PUTting the given object to URI template.

    URI Template variables are expanded using the given map.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be PUT

    uriVariables

    the variables to expand the template

    See also

    HttpEntity

  48. def put(url: String, request: Option[Any], uriVariables: Any*): Unit

    Permalink

    Create or update a resource by PUTting the given object to the URI.

    Create or update a resource by PUTting the given object to the URI.

    URI Template variables are expanded using the given URI variables, if any.

    The request parameter can be a org.springframework.http.HttpEntity in order to add additional HTTP headers to the request.

    url

    the URL

    request

    the Object to be PUT

    uriVariables

    the variables to expand the template

    See also

    HttpEntity

  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  50. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped