我尝试在PHP中使用cURL从网站获取html结果,并且我永久地移动了301,但是当我使用命令行时,它正在工作并返回html字符串reuslt。
这是我的Code PHP(结果不成功)
import {Http, Headers, RequestOptions} from '@angular/http';
let link = 'http://demo.mydomain.com/myservice/login';
var headers = new Headers();
headers.append("Accept", 'application/json');
let postParams = JSON.stringify({"password":this.passCode, "userName":this.userName});
this.http.post(link, postParams, {headers: headers, WithCredentials:true})
.subscribe(data => {
alert("data");
}, error => {
alert("error");
});
这是在CMD(结果成功)
Sub foo1()
Dim src As Worksheet
Dim trg As Worksheet
Dim LastRow As Long
Set src = ThisWorkbook.Worksheets("Sheet1")
Set trg = ThisWorkbook.Worksheets("Sheet2")
src.Range("U:U").Copy Destination:=trg.Range("A1")
src.Range("AR:AR").Copy Destination:=trg.Range("B1")
src.Range("BF:BF").Copy Destination:=trg.Range("C1")
End Sub