Login
Register
All class groups
Latest entries
Top 10 charts
Blog
Forums
Shop
Help
Login
Register
how to use http_arguments post xml only?
Search
All class groups
Latest entries
Top 10 charts
Blog
Forums
Shop
Help
Recommend
this page to a friend!
PHP OAuth Library
>
PHP OAuth Library package blog
>
How to Implement PHP ...
>
All threads
>
how to use http_arguments post xml only?
>
(Un) Subscribe thread alerts
Subject:
how to use http_arguments post xml only?
Summary:
returned "Content-Type: multipart/form-data"
Messages:
5
Author:
allenmao
Date:
2015-04-29 04:58:24
1. how to use http_arguments post xml only?
Reply
Report abuse
allenmao - 2015-04-29 04:58:24
hi there,
i tried
$client->http_arguments = array('RequestMethod'=>'POST','PostFiles'=>array('userfile'=>array('FileName'=>'newjob.xml','Content-Type'=>'application/xml')));
and i get:
Content-Type: multipart/form-data; boundary=--ca8d5e98fae617786e7a489da3fc5af0
Content-Leng......
what i want is to post pure application/xml file to the server, is it possibile? thanks
2. Re: how to use http_arguments post xml only?
Reply
Report abuse
allenmao - 2015-04-29 05:11:00 -
In reply to
message 1
from allenmao
after seeing :
$arguments["RequestMethod"]="POST";
$arguments["Headers"]["SoapAction"]="";
$arguments["Headers"]["EndPointURL"]="http://www.atlaz.net/webservices/GetCurrencyExchange.php";
$arguments["Headers"]["Content-Type"]="text/xml; charset=\"utf-8\"";
$arguments["Body"]="<?xml version='1.0' encoding='UTF-8'?>....";
i am trying to do something like this, but failed:
$client->http_arguments = array('RequestMethod'=>'POST','Content-Type'=>'text/xml','Body'=>$xml);
3. Re: how to use http_arguments post xml only?
Reply
Report abuse
Manuel Lemos - 2015-04-29 05:12:34 -
In reply to
message 1
from allenmao
If you want to send a XML file as request body, just set the RequestContentType option to 'application/xml' and set the RequestBody option to the file contents.
$options = array(
'RequestContentType'=>'application/xml',
'RequestBody'=>file_get_contents('newjob.xml')
);
4. Re: how to use http_arguments post xml only?
Reply
Report abuse
allenmao - 2015-04-29 05:27:13 -
In reply to
message 3
from Manuel Lemos
$client->http_arguments = array($options=array('RequestContentType'=>'application/xml','RequestBody'=>file_get_contents('newjob.xml'));
not working!
5. Re: how to use http_arguments post xml only?
Reply
Report abuse
Manuel Lemos - 2015-04-29 05:34:56 -
In reply to
message 4
from allenmao
No, it is the $options parameter of the CallAPI function.
About us
Advertise on this site
Site map
Newsletter
Statistics
Site tips
Privacy policy
Contact
Copyright (c)
Icontem
1999-2025
For more information send a message to
info at phpclasses dot org
.
image/svg+xml
image/svg+xml
Contact us using Messenger