Can the $http method in AngularJS be used to send ajax requests using the LINK/UNLINK method? I have checked the AngularJS documentation and only found a list of available methods:
- $http.get
- $http.head
- $http.post
- $http.put
- $http.delete
- $http.jsonp
- $http.patch
The LINK method is valuable for establishing relationships between resources, so it would be unfortunate if it is not supported. If anyone knows how to use this method, could you provide an example?
Examples of LINK/UNLINK method:
There are various use cases for the LINK and UNLINK methods. Here are some examples:
Example 1: Creating links between an image and the profiles of two associated people:
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 a 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 is some documentation on the LINK method: