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

#5823 add responseStatusCode #6170

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

rogin
Copy link

@rogin rogin commented Apr 17, 2024

resolves #5823

Store the HTTP status code in the Response Map

@jonbartels
Copy link
Contributor

@rogin hopefully a quick question does String.valueOf(statusCode) return the status code like 200 or like 200.0?

@jonbartels
Copy link
Contributor

@ARShelleyNextGen and @JackieK5 this is a good one line PR that makes Mirth easier to use. Would it be possible to merge it for 4.6.0?

@rogin
Copy link
Author

rogin commented May 23, 2024

@rogin hopefully a quick question does String.valueOf(statusCode) return the status code like 200 or like 200.0?

It's been awhile, but IIRC it returned "200".

@@ -335,6 +335,7 @@ public Response send(ConnectorProperties connectorProperties, ConnectorMessage c
list.add(header.getValue());
}

connectorMessage.getConnectorMap().put("responseStatusCode", String.valueOf(statusCode));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think my preference would be to leave it as an int rather than converting it to a String. It is a numerical value, after all.

It won't have the issue with velocity adding the .0 that @jonbartels alluded to because java auto-boxing will store it as a java.lang.Integer rather than a java.lang.Double as it would be if you put a JavaScript number into the map.

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.

[IDEA] Stored Response Status Code as Individual Variable.
3 participants