Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support POSTing application-x-www-form-urlencoded Content-Type #2291

Closed
wants to merge 2 commits into from

Conversation

upgradingdave
Copy link
Contributor

@upgradingdave upgradingdave commented Apr 2, 2024

Description

Its currently not possible make a POST request and send data in the body with Content-Type of application/x-www-form-urlencoded.

The unqork api requires this and I think other folks can benefit from the ability as well.

The way I implemented this is that if there's a header set like this:

{
  "Content-Type": "application/x-www-form-urlencoded"
}

Then a body like this will be interpreted correctly:

{
  "grant_type":"password",
  "username":unqorkUsername,
  "password":unqorkPassword
}

Screen Shot 2024-04-02 at 5 57 55 PM

Related issues

camunda-8-rest-connector-for-body-other-than-json

@sbuettner
Copy link
Contributor

@upgradingdave Thanks for the contribution. Would you add a test (possibly using Wiremock) that demonstrates that the approach works? You can for example create one based on our e2e test suite: https://github.com/camunda/connectors/blob/main/connectors-e2e-test/connectors-e2e-test-http/src/test/java/io/camunda/connector/e2e/HttpTests.java#L97

Or inside the Connector project itself of course.

@sbuettner
Copy link
Contributor

@johnBgood can we close this one as its covered by #2660

@johnBgood
Copy link
Contributor

@sbuettner sure 💯

@sbuettner
Copy link
Contributor

Closing this as it will be covered by the new REST Connector implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants