분류
javascript
브라우저 비동기 http 요청
본문
https://github.com/ded/reqwest
reqwest('path/to/html', function (resp) { qwery('#content').html(resp) }) reqwest({ url: 'path/to/html' , method: 'post' , data: { foo: 'bar', baz: 100 } , success: function (resp) { qwery('#content').html(resp) } }) reqwest({ url: 'path/to/html' , method: 'get' , data: [ { name: 'foo', value: 'bar' }, { name: 'baz', value: 100 } ] , success: function (resp) { qwery('#content').html(resp) } }) reqwest({ url: 'path/to/json' , type: 'json' , method: 'post' , error: function (err) { } , success: function (resp) { qwery('#content').html(resp.content) } })
- 이전글Google 일반적인 자바 스크립트 라이브러리 19.04.11
- 다음글자바스크립트로 쉬운 멀티 코어 프로세싱 19.04.11