function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Katie DeLuna 7Katie DeLuna 7 

removing spaces in URLs

I'm trying to write a class and trigger that allows me to call out to a webservice - Jira. However, my url is getting a 'null' status. I realized there were spaces in the url, so I added %20 in the url. I still got the same message. I've included the debug log below:

req = System.HttpRequest[Endpoint=http://jira.zzz/rest/customware/connector/1.0/B6DB-9597-179C-LL4Y/Case/500n0000001OXcrAAG/LEV/Client%20Issue%20-%20Level%201/john%doe/test/issue/synchronize.json, Method=PUT]


08:55:20.064 (64488504)|SYSTEM_METHOD_EXIT|[32]|System.debug(ANY)
08:55:20.064 (64503763)|SYSTEM_METHOD_ENTRY|[34]|System.Http.send(ANY)
08:55:20.064 (64580655)|CALLOUT_REQUEST|[34]|System.HttpRequest[Endpoint=http://jira.zzz/rest/customware/connector/1.0/B6DB-9597-179C-LL4Y/Case/500n0000001OXcrAAG/LEV/Client%20Issue%20-%20Level%201/jiohn%doe/test/issue/synchronize.json, Method=PUT]
08:55:30.077 (10077030307)|EXCEPTION_THROWN|[34]|System.CalloutException: Read timed out
08:55:30.077 (10077113104)|SYSTEM_METHOD_EXIT|[34]|System.Http.send(ANY)
08:55:30.077 (10077198962)|SYSTEM_METHOD_ENTRY|[38]|System.HttpResponse.toString()
08:55:30.077 (10077291506)|SYSTEM_METHOD_EXIT|[38]|System.HttpResponse.toString()
08:55:30.077 (10077319303)|SYSTEM_METHOD_ENTRY|[38]|System.debug(ANY)
08:55:30.077 (10077335189)|USER_DEBUG|[38]|DEBUG|

exception caught = System.HttpResponse[Status=null, StatusCode=0]

SeAlVaSeAlVa
Have you tried replacing the space by the plus sign? "+" (without quotes)

Kind regards
Katie DeLuna 7Katie DeLuna 7
I still got a null response :(

I'm not sure if it has to do with my endpoint to Jira?

req.setEndpoint( http://jira/plugins/servlet/customware/connector/'+systemId+'/'+objectType+'/'+caseId+'/'+projectKey+'/'+issueType+'/'+reporter+'/'+summary+'/issue/create.json');