File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,9 +251,11 @@ function isWebAction (action) {
251251function isRawWebAction ( action ) {
252252 const raw = 'raw'
253253 const webExportValue = action ?. annotations ?. [ 'web-export' ]
254+ const rawHttpValue = action ?. annotations ?. [ 'raw-http' ]
255+ const isRawHttp = rawHttpValue === true || rawHttpValue === 'yes' || rawHttpValue === 'true'
254256 const webValue = action ?. web
255257
256- return ( webExportValue === raw || webValue === raw )
258+ return ( webExportValue === raw || webValue === raw || isRawHttp )
257259}
258260
259261/**
Original file line number Diff line number Diff line change @@ -520,6 +520,32 @@ describe('isRawWebAction', () => {
520520 } )
521521} )
522522
523+ test ( 'action.annotations.raw-http' , ( ) => {
524+ let action
525+
526+ action = { annotations : { } }
527+ expect ( isRawWebAction ( action ) ) . toBeFalsy ( )
528+
529+ action = { annotations : { 'raw-http' : 'raw' } }
530+ expect ( isRawWebAction ( action ) ) . toBeFalsy ( )
531+
532+ action = { annotations : { 'raw-http' : 'any other string value' } }
533+ expect ( isRawWebAction ( action ) ) . toBeFalsy ( )
534+
535+ action = { annotations : { 'raw-http' : false } }
536+ expect ( isRawWebAction ( action ) ) . toBeFalsy ( )
537+
538+ action = { annotations : { 'raw-http' : true } }
539+ expect ( isRawWebAction ( action ) ) . toBeTruthy ( )
540+
541+ action = { annotations : { 'raw-http' : 'yes' } }
542+ expect ( isRawWebAction ( action ) ) . toBeTruthy ( )
543+
544+ action = { annotations : { 'raw-http' : 'true' } }
545+ expect ( isRawWebAction ( action ) ) . toBeTruthy ( )
546+ } )
547+
548+
523549describe ( 'statusCodeMessage' , ( ) => {
524550 test ( '900 - invalid' , ( ) => {
525551 const statusCode = 900
You can’t perform that action at this time.
0 commit comments