@@ -1886,11 +1886,11 @@ private async Task<JObject> Exec()
18861886 if ( this . ContentTypeInstance != null && this . ContentTypeInstance ? . StackInstance . LivePreviewConfig . Enable == true
18871887 && this . ContentTypeInstance ? . StackInstance . LivePreviewConfig . ContentTypeUID == this . ContentTypeInstance ? . ContentTypeId
18881888 && header . Key == "access_token"
1889- && isLivePreview )
1889+ && ! string . IsNullOrEmpty ( this . ContentTypeInstance . StackInstance . LivePreviewConfig . LivePreview ) )
18901890 {
18911891 continue ;
18921892 }
1893- headerAll . Add ( header . Key , ( string ) header . Value ) ;
1893+ headerAll . Add ( header . Key , ( String ) header . Value ) ;
18941894 }
18951895 }
18961896
@@ -1941,7 +1941,25 @@ private async Task<JObject> Exec()
19411941 }
19421942 else
19431943 {
1944+ // console.WriteLine url, mainjson and headerAll
1945+ Console . WriteLine ( "==========================" ) ;
1946+ Console . WriteLine ( this . _Url ) ;
1947+
1948+ foreach ( var kvp in mainJson )
1949+ {
1950+ if ( kvp . Key == "live_preview" )
1951+ {
1952+ Console . WriteLine ( "mainjson==================" ) ;
1953+ Console . WriteLine ( $ "Key: { kvp . Key } , Value: { kvp . Value } ") ;
1954+ }
1955+ }
1956+ Console . WriteLine ( "headerAll==================" ) ;
1957+ foreach ( var kvp in headerAll )
1958+ {
1959+ Console . WriteLine ( $ "Key: { kvp . Key } , Value: { kvp . Value } ") ;
1960+ }
19441961 HttpRequestHandler requestHandler = new HttpRequestHandler ( this . ContentTypeInstance . StackInstance ) ;
1962+ Console . WriteLine ( _Url ) ;
19451963 var outputResult = await requestHandler . ProcessRequest ( _Url , headerAll , mainJson , Branch : this . ContentTypeInstance . StackInstance . Config . Branch , isLivePreview : isLivePreview , timeout : this . ContentTypeInstance . StackInstance . Config . Timeout ) ;
19461964 return JObject . Parse ( ContentstackConvert . ToString ( outputResult , "{}" ) ) ;
19471965 }
0 commit comments