trait Http extends Object
The $http service is a core Angular service that facilitates communication with the remote HTTP servers via the browser's XMLHttpRequest object or via JSONP.
- Annotations
- @RawJSType() @native()
- See also
https://docs.angularjs.org/api/ng/service/$http
- Alphabetic
- By Inheritance
- Http
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
def
apply[T <: Any](config: HttpConfig): Promise[HttpResponse[T]]
Usage: $http(config)
Usage: $http(config)
- config
Object describing the request to be made and how it should be processed.
- returns
Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two arguments a success and an error callback which will be called with a response object. The success and error methods take a single argument - a function that will be called when the request succeeds or fails respectively. The arguments passed into these functions are destructured representation of the response object passed into the then method.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
delete[T <: Any](url: String, data: Any = js.native, config: HttpConfig = js.native, headers: Dictionary[Any] = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a DELETE request.
Shortcut method to perform a DELETE request.
- url
Relative or absolute URL specifying the destination of the request
- data
Request content
- config
Optional configuration object
- returns
a promise of an response
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T <: Any](url: String, config: HttpConfig = js.native, headers: Dictionary[Any] = js.native): Promise[HttpResponse[T]]
Relative or absolute URL specifying the destination of the request
Relative or absolute URL specifying the destination of the request
- url
Relative or absolute URL specifying the destination of the request
- config
Optional configuration object
- returns
a promise of an response
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
head[T <: Any](url: String, config: HttpConfig = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a HEAD request.
Shortcut method to perform a HEAD request.
- url
Relative or absolute URL specifying the destination of the request
- config
Optional configuration object
- returns
a promise of an response
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
jsonp[T <: Any](url: String, config: HttpConfig = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a JSONP request.
Shortcut method to perform a JSONP request.
- url
Relative or absolute URL specifying the destination of the request
- config
Optional configuration object
- returns
a promise of an response
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
patch[T <: Any](url: String, data: Any = js.native, config: HttpConfig = js.native, headers: Dictionary[Any] = js.native, responseType: String = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a PATCH request.
Shortcut method to perform a PATCH request.
- url
Relative or absolute URL specifying the destination of the request
- data
Request content
- config
Optional configuration object
- returns
a promise of an response
-
def
post[T <: Any](url: String, data: Any = js.native, config: HttpConfig = js.native, headers: Dictionary[Any] = js.native, responseType: String = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a POST request.
Shortcut method to perform a POST request.
- url
Relative or absolute URL specifying the destination of the request
- data
Request content
- config
Optional configuration object
- returns
a promise of an response
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
put[T <: Any](url: String, data: Any = js.native, config: HttpConfig = js.native, headers: Dictionary[Any] = js.native, responseType: String = js.native): Promise[HttpResponse[T]]
Shortcut method to perform a PUT request.
Shortcut method to perform a PUT request.
- url
Relative or absolute URL specifying the destination of the request
- data
Request content
- config
Optional configuration object
- returns
a promise of an response
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
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( ... )