Open Porok12 opened 6 months ago
My workaround:
diff --git a/node_modules/jira-client/lib/jira.js b/node_modules/jira-client/lib/jira.js
index b94c316..7381301 100644
--- a/node_modules/jira-client/lib/jira.js
+++ b/node_modules/jira-client/lib/jira.js
@@ -740,14 +740,12 @@ class JiraApi {
searchJira(searchString, optional = {}) {
return this.doRequest(this.makeRequestHeader(this.makeUri({
- pathname: '/search'
- }), {
- method: 'POST',
- followAllRedirects: true,
- body: {
+ pathname: '/search',
+ query: {
jql: searchString,
...optional
}
+ }), {
+ followAllRedirects: true,
}));
}
/** Create a Jira user
Per their docs:
If the JQL query expression is too large to be encoded as a query parameter, use the POST version of this resource.
The benefit of using the POST method is larger search strings can be passed. Could you paste the error message you're reciveing when using the POST method?
I'm getting 403 forbidden, maybe server don't have/handle post requests for some reason.
Query params can be very long so there should not be any problem with jql query lenght.
Maybe lets user decide which one should be used?
Is there possibility to switch to version with GET (instead of POST) like python client has? I can only use GET method, POST will fail.