Ask Your Question
1

Using HTTP Server Origin for application/x-www-form-urlencoded data

asked 2018-04-26 21:31:35 -0500

Invigor gravatar image

Hi,

I'm trying to use the HTTP Server Origin to receive a webhook where the data is encoded as application/x-www-form-urlencoded. Since there is no Data Type specifically for HTTP form data, I am using Text and will parse it using the Expression Evaluator

I'm testing using Postman can see the request coming in but it does not generate a record.

If I change Postman to use Form data rather than x-www-form-urlencoded, SDC works fine and captures the text correctly.

Can anyone shed light on what is happening and what I can do to work around this issue?

Thanks

Michael

edit retag flag offensive close merge delete

Comments

Offhand, I can't see any reason why this origin should not be able to support the application/x-www-form-urlencoded content type. Please open an enhancement Jira: issues.streamsets.com

jeff gravatar imagejeff ( 2018-04-30 11:01:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-07 16:18:49 -0500

metadaddy gravatar image

I just created a simple pipeline - HTTP Server (text format) to Local FS (JSON), and tested with curl:

curl http://localhost:8000/ -d 'a=1' -H 'X-SDC-APPLICATION-ID: bob' -H 'Content-type: application/x-www-form-urlencoded'

works exactly as expected - I see {"text":"a=1"} in the output file. Can you compare what the webhook sends with what curl sends and see if there is some subtle difference?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-04-26 21:31:35 -0500

Seen: 39 times

Last updated: May 07