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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that the statusCode should probably be left as an int.

Copy link
Collaborator

@pacmano1 pacmano1 May 29, 2024

Choose a reason for hiding this comment

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

Well sure...would want to do response code comparisons by integer ranges anyway.

200s are OK
300s are redirects.
400s are errors
etc

Copy link
Author

Choose a reason for hiding this comment

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

Updated.

@pladesma pladesma changed the base branch from development to pr-6170-add-status-code-to-connector-map June 12, 2024 19:05
@pladesma pladesma merged commit 3dcc058 into nextgenhealthcare:pr-6170-add-status-code-to-connector-map Jun 12, 2024
@rogin rogin deleted the store-http-code branch June 13, 2024 01:23
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.
5 participants