我有一个 URL 和一些要发布的数据
我试试这段代码:
var par = "#DREDOCREF docrefXXX \n";
par += "#DREFIELDNAME XML/DOCUMENT/DREFIELD/ENTITIES/persona \n";
par += "#DREXMLFIELDVALUE <entitaid>2</entitaid><nominativo>Pamela Verdicchio</nominativo><nome>Pamela</nome><cognome>Verdicchio</cognome><sesso>F</sesso> \n";
par += "#DREFIELDNAME XML/DOCUMENT/DREFIELD/ENTITIES/persona \n";
par += "#DREXMLFIELDVALUE <entitaid>1</entitaid><nominativo>Mauro Rossini</nominativo><nome>Mauro</nome><cognome>Rossini</cognome><sesso>M</sesso> \n";
par += "#DREFIELDNAME XML/DOCUMENT/DREFIELD/ENTITIES/persona \n";
par += "#DREXMLFIELDVALUE <entitaid>2</entitaid><nominativo>Gino Paoli</nominativo><nome>Gino</nome><cognome>Paoli</cognome><sesso>M</sesso> \n";
par += "#DREFIELDNAME XML/DOCUMENT/DREFIELD/ENTITIES/persona \n";
par += "#DREXMLFIELDVALUE <entitaid>2</entitaid><nominativo>Anna Tatangelo</nominativo><nome>Anna</nome><cognome>XXX</cognome><sesso>F</sesso> \n";
par += "#DREFIELDNAME XML/DOCUMENT/DREFIELD/ENTITIES/persona \n";
par += "#DREXMLFIELDVALUE <entitaid>2</entitaid><nominativo>Bersani</nominativo><cognome>Bersani</cognome><sesso>M</sesso> \n";
par += "#DREENDDATANOOP";
Ext.Ajax.request({
url: 'http://localhost:10111/DREREPLACE?ReplaceAllRefs=true&InsertValue=false&MultipleValues=true',
method: 'POST',
params: par,
success: function (response){
Ext.Msg.alert('POST OK');
},
failure: function (){
Ext.Msg.alert('Error Post!!');
}
});
Url 已发送,但 DATA 未发送。怎么做?请帮忙
*我可以通过使用“文本输入”的发送 Http 工具来做到这一点: