Skip to content

Commit 6179844

Browse files
committed
Added an HTTP POST snippet
1 parent 9fa8a23 commit 6179844

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<snippet>
2+
<content><![CDATA[
3+
let headers = new Headers();
4+
headers.append('Content-Type', 'application/json')
5+
6+
return this.${1:http}.post(`${2:url}`, JSON.stringify(${3:data}), { headers })
7+
.map((res: Response) => res.json());$0]]></content>
8+
<tabTrigger>ng2-http-post</tabTrigger>
9+
<scope>source.ts,source.tsx,source.js</scope>
10+
<description>Angular 2 HTTP Post Snippet</description>
11+
</snippet>

0 commit comments

Comments
 (0)