How do I post XML to RESTFUL Web Service using Net::HTTP::Post?

后端 未结 2 1967
谎友^
谎友^ 2020-12-15 23:04

I am having trouble getting this to work so any help would be appreciated! Basically, the request.body contains valid XML for the Web Service like so:



        
相关标签:
2条回答
  • 2020-12-15 23:32

    Without knowing anything about the service, this is just a guess, but… is the service expecting a specific header that Poster is setting and you aren't?

    0 讨论(0)
  • 2020-12-15 23:45

    If I were you, I'd use Wireshark, tcpflow or some other sniffer to look at the exact data Poster and your app are sending, and make sure they're identical. I've seen services that were sensitive to the weirdest things, like whitespace or user agent.

    0 讨论(0)
提交回复
热议问题