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

Allow http binding to both poco and HttpRequestMessage. #284

Merged
merged 1 commit into from
Sep 8, 2017
Merged

Conversation

MikeStall
Copy link
Contributor

Fix #273

Script had special logic to allow this for CSX; but VS tooling and direct SDK users didn't have the same logic. Add the httprequest binding logic in the binding.

Copy link
Member

@fabiocav fabiocav left a comment

Choose a reason for hiding this comment

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

This will be sent to dev as well, correct?

if (parameter.ParameterType == typeof(HttpRequestMessage))
{
// Not already claimed by another trigger?
if (parameter.GetCustomAttributes(false).Length == 0)
Copy link
Member

Choose a reason for hiding this comment

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

Should we be more specific on the type of attribute here (verify this is indeed a binding attribute so we still allow for other attributes)?

{
throw new ArgumentNullException(nameof(context));
}
var request = context.BindingData["$request"];
Copy link
Member

Choose a reason for hiding this comment

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

Didn't we have constants with special binding data names somewhere? Would be good to move this there.

Copy link
Member

@fabiocav fabiocav left a comment

Choose a reason for hiding this comment

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

:shipit:

Script had special logic to allow this for CSX; but VS tooling and direct SDK users didn't have the same logic. Add the httprequest binding logic in the binding.
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.

3 participants