File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,7 @@ Examples:
666666- ✅ ` https://api.trigger.dev `
667667- ✅ ` https://api.trigger.dev/custom-prefix `
668668- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
669+ - ✅ ` https://api.trigger.dev/custom%20prefix ` (percent-encoded whitespace)
669670- ❌ ` https://api.trigger.dev?foo=bar `
670671- ❌ ` https://api.trigger.dev#fragment `
671672- ❌ ` https://user:pass@api.trigger.dev `
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ Examples:
173173- ✅ ` https://api.trigger.dev `
174174- ✅ ` https://api.trigger.dev/custom-prefix `
175175- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
176+ - ✅ ` https://api.trigger.dev/custom%20prefix ` (percent-encoded whitespace)
176177- ❌ ` https://api.trigger.dev?foo=bar ` (query string)
177178- ❌ ` https://api.trigger.dev#fragment ` (hash fragment)
178179- ❌ ` https://user:pass@api.trigger.dev ` (credentials)
Original file line number Diff line number Diff line change @@ -973,6 +973,17 @@ describe("TriggerChatTransport", function () {
973973 } ) . not . toThrow ( ) ;
974974 } ) ;
975975
976+ it ( "accepts percent-encoded whitespace in baseURL paths" , function ( ) {
977+ expect ( function ( ) {
978+ new TriggerChatTransport ( {
979+ task : "chat-task" ,
980+ accessToken : "pk_trigger" ,
981+ baseURL : "https://api.trigger.dev/custom%20prefix" ,
982+ stream : "chat-stream" ,
983+ } ) ;
984+ } ) . not . toThrow ( ) ;
985+ } ) ;
986+
976987 it ( "accepts whitespace-wrapped uppercase http protocol in baseURL" , function ( ) {
977988 expect ( function ( ) {
978989 new TriggerChatTransport ( {
@@ -3525,6 +3536,17 @@ describe("TriggerChatTransport", function () {
35253536 } ) . not . toThrow ( ) ;
35263537 } ) ;
35273538
3539+ it ( "accepts percent-encoded whitespace in baseURL paths from factory" , function ( ) {
3540+ expect ( function ( ) {
3541+ createTriggerChatTransport ( {
3542+ task : "chat-task" ,
3543+ accessToken : "pk_trigger" ,
3544+ baseURL : "https://api.trigger.dev/custom%20prefix" ,
3545+ stream : "chat-stream" ,
3546+ } ) ;
3547+ } ) . not . toThrow ( ) ;
3548+ } ) ;
3549+
35283550 it ( "accepts uppercase http protocol from factory without throwing" , function ( ) {
35293551 expect ( function ( ) {
35303552 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments