-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix and cleanup IEC.postman_collection.json #113
Conversation
…uto generates the correct Content-Type of application/x-www-form-urlencoded instead. Having the content type twice in Postman causes it to behave inconsistently, and sometimes work but not allways. This change should fix it.
…tically by the export of the latest version of Postman.
…ET request that should not have a Content-Type. It was disabled anyway, but I removed it becuase it was also wrong. Also fixed the value of the disabled Accept header to be text/html because this is the returned content type of this request. I left it disabled because the api also works without it.
…APIs, because it must run before the RemoteReadingRange api.
…path param looks like a double slash in the url "//". This empty path element makes no difference, and the API works with and without it. The latest version of Postman removes it automatically. I am pretty sure that this extra slash is actually a bug in the IEC front-end code, and shoult not be used in the API.
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
@maorcc I have to praise you for the clear and VERY informative PR. |
@maorcc The only part I'm concerned about is the double-slash. From tests I've done when I wrote this, IEC API failed on single slash and worked on double, for some reason. I want to make sure you've tested this |
Yes, after doing all the changes, including the removal of double slashes I tested it as I described above:
|
Thanks again for your work |
User description
What changes do you are proposing?
I have done the following fixes and cleanups. The first one fixes a bug, the rest are mostly cleanups. Each fix is its own commit.
Remove the duplicate Content-Type header in step 5
Fix Auth step 5 remove Content-Type: application/json. Postman adds auto generates the correct Content-Type of application/x-www-form-urlencoded instead. Having the content type twice in Postman causes it to behave inconsistently, and sometimes works but not always. This change should fix it.
Remove type "text" from content-type parameters.
This was done automatically by the export of the latest version of Postman.
Remove Content-type of application/json from step 4
Done because this step is a GET request that should not have a Content-Type header. It was disabled anyway, but I removed it as it was wrong.
Sort APIs list
Moved the Devices api upwards to its correct location in the list of APIs, because it must run before the RemoteReadingRange API.
Clean double slash in URL
Postman removes the double slash ("//") from all URLs on import.
This empty path element makes no difference, and the API works with and without it.
This extra slash is probably a bug in the IEC front-end, and was not intended to be there by their IEC API backend developers.
How did you test these changes?
To test I cleared my Postman workspace. Re-imported the file, and tested that all APIs are working and returning valid data.
Closing issues
PR Type
enhancement, bug fix
Description
Content-Type
headers in multiple steps to ensure consistent behavior in Postman.type: "text"
fromContent-Type
andAccept
headers as per the latest Postman export.Content-Type
for GET requests, ensuring they do not have aContent-Type
header.Devices
API upwards to its correct location.Changes walkthrough 📝
IEC.postman_collection.json
Fix headers, clean URLs, and reorder APIs in Postman collection.
IEC.postman_collection.json
Content-Type
headers in multiple steps.type: "text"
fromContent-Type
andAccept
headers.Content-Type
for GET requests.Devices
API upwards.