Fix Aspen History queries by sending XML via POST body (UTF-8)#462
Fix Aspen History queries by sending XML via POST body (UTF-8)#462larosi wants to merge 1 commit intoequinor:mainfrom
Conversation
|
Hi! Thanks for this PR! I have a concern about backward compatibility: this change modifies the fetch function to always use POST requests when params is a string, which could break existing functionality for users who need GET requests with string parameters. Since I'm not deeply familiar with all the Aspen implementation details, I'm unsure what edge cases this might affect. Could you refactor this to preserve the existing behavior by either: Adding a parameter to explicitly control the HTTP method (e.g., method="POST" or use_post=True), or |
Problem
XML History queries were sent using
GETwith the XML embedded in the URL.When tag names contain special or non-ASCII characters (e.g.
%,ñ), the querybecomes invalid and Aspen returns:
No query has been specified.Fix
Send XML queries using POST with the XML in the request body and
Content-Type: text/xml; charset=utf-8.