You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now a user has to give an xml class item to stub_request to match to an xml request body because for request bodies if we detect xml we just use xml2::read_xml which gives a xml_document class, which appears we can not compare to even another xml_doc probably because they have different pointers
x= read_xml("<foo> <bar> text <baz/> </bar> </foo>")
y= read_xml("<foo> <bar> text <baz/> </bar> </foo>")
identical(x, y)
#> [1] FALSE
What we're aiming for is to be able to do the following
- convert the stub body pattern from json to a list if it seems like json
- in body_as_hash change fromJSON to not use FALSE as second param
- #134 in body_as_hash change xml approach to try catch converting xml to a list or return xml as character on error
- in matches method for bodypattern add handling of pattern or request body being NA or NULL and returning false if so
Right now a user has to give an xml class item to stub_request to match to an xml request body because for request bodies if we detect xml we just use
xml2::read_xml
which gives axml_document
class, which appears we can not compare to even another xml_doc probably because they have different pointersWhat we're aiming for is to be able to do the following
In which the stub can just have an R list while the request body has XML (or JSON or a list itself), but we can still compare them
The text was updated successfully, but these errors were encountered: