Giter Site home page Giter Site logo

Comments (4)

amilbourne avatar amilbourne commented on August 9, 2024

My suggested solution is to change the config parameters as follows:

Split the data (payload) parameter into URL Parameters and Body Content as 2 separate config params.
The URL Parameters would be a list of strings, each being of the form 'key=value'. This would allow the part after the first equals to be URL Encoded.

So the old config might have been (although I don't think this would have worked correctly):

"rest.source.method": "GET",
"rest.source.url": "http://example.com/rest-endpoint",
"rest.source.data":"param1=val1&param2=1+2"

So the new config might look like:

"rest.source.method": "POST",
"rest.source.url": "http://example.com/rest-endpoint",
"rest.source.payload.body":"Couldn't be done under old code"
"rest.source.payload.params": [ "param1=val1", "param2=1+2" ]

Obviously this would be a breaking change.

What do you think? Can you think of a better solution or a reason why it isn't an issue?

from kafka-connect-rest.

amilbourne avatar amilbourne commented on August 9, 2024

I am happy to fix this (or be wrong about the problem) - I an just trying to get feedback on the best way to do it.

from kafka-connect-rest.

amilbourne avatar amilbourne commented on August 9, 2024

My suggested syntax above doesn't seem to work. I was a bit confused and was trying to mix properties and JSON syntax :-(

A revised version (which isn't as elegant) could be:

"rest.source.method": "POST",
"rest.source.url": "http://example.com/rest-endpoint",
"rest.source.body":"Couldn't be done under old code"
"rest.source.param.names": "param1, param2"
"rest.source.param.param1.value": "val1"
"rest.source.param.param2.value": "1+2"

from kafka-connect-rest.

amilbourne avatar amilbourne commented on August 9, 2024

Thanks for merging this.
This issue should hopefully be resolved now.

from kafka-connect-rest.

Related Issues (15)

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.