Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Improve HTTP response file behavior #136

Open
alexjhawk opened this issue Jul 12, 2023 · 1 comment
Open

Improve HTTP response file behavior #136

alexjhawk opened this issue Jul 12, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@alexjhawk
Copy link
Collaborator

Improve the HTTP response file behavior by including a unique number or value in the name. This prevents the possibility of simultaneous requests overlapping and causing file access errors such as

32603  httpc-http request error
21317  eftp-Write operation is already in progress. New (/usr/responses/dataMessageResponse.json)

Additionally, the cleanup/deletion of response files is inconsistent and should be improved so all temporary response files are deleted once parsed/processed.

@alexjhawk
Copy link
Collaborator Author

The implementation of improved functionality should be relatively straightforward, as response contents are already read/returned by the SCHttpUtility class methods.

The SCHttpUtility class also includes automatic functionality to create and delete temporary, unique response files when using the httpGet and httpPost method overloads without a specified file name.

The TWApiManager class in the Thingworx Connector may serve as an example implementation of the intended new usage: https://github.com/hms-networks/flexy-thingworx-connector/blob/d04a82bb7ca0402e5c5f14aabea3cd28a938439c/src/main/java/com/hms_networks/americas/sc/thingworx/data/TWApiManager.java#L148.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant