Skip to content

Commit

Permalink
Added an HTTP POST snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
pjlamb12 committed Sep 12, 2016
1 parent 9fa8a23 commit 6179844
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions snippets/ng2-http-post.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<snippet>
<content><![CDATA[
let headers = new Headers();
headers.append('Content-Type', 'application/json')
return this.${1:http}.post(`${2:url}`, JSON.stringify(${3:data}), { headers })
.map((res: Response) => res.json());$0]]></content>
<tabTrigger>ng2-http-post</tabTrigger>
<scope>source.ts,source.tsx,source.js</scope>
<description>Angular 2 HTTP Post Snippet</description>
</snippet>

0 comments on commit 6179844

Please sign in to comment.