Giter Site home page Giter Site logo

Comments (4)

budjb avatar budjb commented on June 26, 2024

What object do you want to pass that contains XML? I didn't add a built-in because the groovy markup builders are mostly aimed at writing to a StringWriter.

from http-requests.

thecodesmith avatar thecodesmith commented on June 26, 2024

Ah, you mean use a markup builder to create an XML string, and use that as the request content? That sounds reasonable, I'll try it out.

Ideally I'd like to be able to post a Map directly and specify an XML content-type, like is possible with JSON. It would only be simple nested data, no XML attributes. Do you think that is worthwhile, or should we stick with a markup builder solution?

from http-requests.

budjb avatar budjb commented on June 26, 2024

The library is a bit opinionated right now if you use the default set of converters in that it always tries to treat lists or maps like JSON. Now that you mention your use case, this might be an area that could be improved.

The thing about map/list structures is that they have a 1-1 conversion to and from JSON, but this not the case with XML (and lists, in particular). If an XML renderer is outputting XML based on a list in a generic fashion, it is making decisions about your schema for you. This reason gives me pause about having a generic, automatic conversion to XML.

from http-requests.

thecodesmith avatar thecodesmith commented on June 26, 2024

I got my case working and based on your explanation, I think this can be closed. Thanks!

from http-requests.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.