Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W
wiki-php
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 互联网应用开发
  • wiki-php
  • Wiki
  • 360safeguardnativeapi

360safeguardnativeapi · Changes

Page history
wangqs created page: 360safeguardnativeapi authored Sep 26, 2017 by 互联网应用开发's avatar 互联网应用开发
Hide whitespace changes
Inline Side-by-side
Showing with 25 additions and 0 deletions
+25 -0
  • 360safeguardnativeapi.md 360safeguardnativeapi.md +25 -0
  • No files found.
360safeguardnativeapi.md
View page @ 202458da
......@@ -30,6 +30,7 @@
```javascript
var req = new Http("http://api.qjhtv.com/api/app/?action=get_weather");
req.setOnSuccess(function(d){ console.log(d) });
req.setReferer
req.fetch();
```
###### 写法二:
......@@ -38,4 +39,28 @@ var req = new Http("http://api.qjhtv.com/api/app/",{"action":"get_weather"});
req.setOnSuccess(function(d){ console.log(d) });
req.fetch();
```
##### 简单的post请求,示例:
```javascript
var req = new Http("http://api.qjhtv.com/api/app/",{"action":"get_weather"});
req.setOnSuccess(function(d){ console.log(d) });
req.setMethod(Http.POST)
req.fetch();
```
#### 调用旅游网站的数据接口,查询导游数据
```javascript
var req = new Http("http://jianguan.12301.cn/data/guide/verify",{"type":3,"value":"CXU5376W"});
//设置为post请求
req.setMethod(Http.POST);
//设置user-agent
req.addHeader("User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36")
//设置referer
req.addHeader("Referer","http://jianguan.12301.cn/")
req.setOnSuccess(function(d){ console.log(d) });
//设置请求方式为json
req.setContentType(Http.ContentTypeJson)
req.fetch()
```
Clone repository
  • 360safeguardnativeapi
  • all new classmate
  • bind phone
  • code standard
  • deploy_sys
  • edit common
  • edit master
  • envrioment
  • find psw
  • front new classmate
  • front statck
  • git
  • Home
  • idcard md5
  • ide
View All Pages