Vue.JS 2 Tutorial #32 - HTTP Requests > JS프레임워크

JS프레임워크

Vue.JS 2 Tutorial #32 - HTTP Requests 정보

Vue Vue.JS 2 Tutorial #32 - HTTP Requests

본문

HTTP Requests

 

vue-resource https://github.com/pagekit/vue-resource

 

import VueResource from 'vue-resource'

Vue.use(VueResource)

 

this.$http.post('http://jsonplaceholder.typicode.com/posts', {

    title: this.blog.title,

    body: this.blog.content,

    userId: 1

  }).then(function(data) {

    console.log(data)

  });

 

status : 201 > HTTP/1.1 201 Created   참조: https://sir.kr/so_phpframework/388

 

JSONPlaceholder 참조 https://sir.kr/so_phpframework/423

 

추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로