![]() |
How to POST XML via Phil Sturgeon's REST library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to POST XML via Phil Sturgeon's REST library (/showthread.php?tid=31944) |
How to POST XML via Phil Sturgeon's REST library - El Forum - 07-07-2010 [eluser]Oskar Smith[/eluser] Hello all, I have a question about how to post XML via Phil Sturgeon's REST library. i.e. http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/ I've successfully run a few GET requests but now want to POST some XML to a RESTful URL. Does anyone know how to do this? I was thinking along the lines of something like: Code: $xml = " But that doesn't work - the receiving URL is returning error messages that indicate that the XML data hasn't been parsed, so therefore hasn't been sent correctly. And yes, I'm running this in EE 2.0 as a third party module, but that's irrelevant. Any pointers on how to POST XML in this manner would be greatly appreciated, thanks. How to POST XML via Phil Sturgeon's REST library - El Forum - 11-17-2010 [eluser]PaulDunn[/eluser] I also would love to know how to do this How to POST XML via Phil Sturgeon's REST library - El Forum - 11-17-2010 [eluser]smilie[/eluser] Have you installed RESTFul api in your CI? I do not use XML, but I do belive it is pretty much same as sending Json. I do it as follows: Code: # In controller, I load (installed) library; So, provide more info where are you stuck at ![]() Cheers, Smilie |