I was wondering if $http can send ajax request to the server using the LINK/UNLINK method (like POST, GET, PUT, PATCH..). I already search in the AngularJS documentation and only found this list of available methods:
- $http.get
- $http.head
- $http.post
- $http.put
- $http.delete
- $http.jsonp
- $http.patch
LINK method is really useful when you want to make relation only between resources, and it is a really shame if it is missing. If someone know how to do this request, can give me an example please?
Examples of LINK/UNLINK method:
There exists a broad range of possible use cases for the LINK and UNLINK methods. The examples that follow illustrate a subset of those cases.
Example 1: Creating two separate links between an image and the profiles of two people associated with the image:
LINK /images/my_dog.jpg HTTP/1.1
Host: example.org
Link: <http://example.com/profiles/joe>; rel="tag"
Link: <http://example.com/profiles/sally>; rel="tag"
Example 2: Removing an existing Link relationship between two resources:
UNLINK /images/my_dog.jpg HTTP/1.1
Host: example.org
Link: <http://example.com/profiles/sally>; rel="tag"
Here are some documentation about LINK method:
http://www.w3.org/Protocols/HTTP/Methods/Link.html
http://tools.ietf.org/id/draft-snell-link-method-01.html#RFC5988