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

PostAgent: allow sending arbitrary string data #1402

Merged
merged 1 commit into from Apr 4, 2016

Conversation

dsander
Copy link
Collaborator

@dsander dsander commented Apr 2, 2016

When content_type contains a MIME type and payload is not a Hash the string in payload will be send as the HTTP body and content_type is send as the Content-Type header.
#1361


Change `content_type` to `xml` to send XML, where the name of the root element may be specified using `xml_root`, defaulting to `post`.

When `content_type` containts a [MIME](https://en.wikipedia.org/wiki/Media_type) type, the interpolated value of `payload` will be send as a string in the HTTP body message and `content_type` will be set as the `Content-Type` HTTP header.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edit:

When `content_type` contains a [MIME](https://en.wikipedia.org/wiki/Media_type) type, and `payload` is a string, its interpolated value will be sent as a string in the HTTP request's body and the request's `Content-Type` HTTP header will be set to `content_type`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention no_merge too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

@cantino
Copy link
Member

cantino commented Apr 4, 2016

Nice!

When `content_type` contains a MIME type and `payload` is not a Hash the string in `payload` will be send as the HTTP
body and `content_type` is send as the `Content-Type` header.

 huginn#1361
@dsander
Copy link
Collaborator Author

dsander commented Apr 4, 2016

Thanks for the review.

@dsander dsander merged commit 8bb7153 into huginn:master Apr 4, 2016
@dsander dsander deleted the post-agent-raw branch April 4, 2016 09:48
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

2 participants