Content-Type in Request.XML()
nikolay-turpitko opened this issue · comments
Request.XML() implemented in a way it matches Content-Type of "application/xml". I encountered a third-party API where I need to send "text/xml". I tried to use MatchType
later in a chain, but it seems counter-intuitive (and didn't match in my case, but may be it's due another cause).
I think, it's, probably, more clear to have separate calls to API, like: gock.Post(...).MatchType(...).XML(...)
. Another option is to add optional parameter to XML()
(or add a new method with parameter).
This was fixed. You can use now in gock@v1.0.5
the following:
gock.Post(...).MatchType("text/xml").XML(...)