File tree Expand file tree Collapse file tree 5 files changed +22
-30
lines changed
Expand file tree Collapse file tree 5 files changed +22
-30
lines changed Original file line number Diff line number Diff line change 55 * @author Krushanu Mohapatra <Krushanu.Mohapatra@tarento.com>
66 */
77
8- const axios = require ( "axios" ) . default ;
98
109var TelemetrySyncManager = {
1110
@@ -61,15 +60,15 @@ var TelemetrySyncManager = {
6160 headersParam [ 'x-app-id' ] = Telemetry . config . pdata . id ;
6261 headersParam [ 'x-device-id' ] = Telemetry . fingerPrintId ;
6362 headersParam [ 'x-channel-id' ] = Telemetry . config . channel ;
64- axios . post (
65- fullPath ,
66- JSON . stringify ( telemetryObj ) ,
67- { headers : { headersParam} }
68- )
69- . then ( ( result ) => {
70- Telemetry . config . telemetryDebugEnabled && console . log ( "Telemetry API success" , result ) ;
71- } )
72- . catch ( ( error ) => {
63+ jQuery . ajax ( {
64+ url : fullPath ,
65+ type : "POST" ,
66+ headers : headersParam ,
67+ data : JSON . stringify ( telemetryObj ) ,
68+ async : async
69+ } ) . done ( function ( resp ) {
70+ Telemetry . config . telemetryDebugEnabled && console . log ( "Telemetry API success" , resp ) ;
71+ } ) . fail ( function ( error , textStatus , errorThrown ) {
7372 if ( instance . _failedBatchSize > instance . _failedBatch . length ) {
7473 instance . _failedBatch . push ( telemetryObj ) ;
7574 }
Original file line number Diff line number Diff line change @@ -2414,7 +2414,6 @@ if (typeof module != 'undefined') {
24142414 * @author Krushanu Mohapatra <Krushanu.Mohapatra@tarento.com>
24152415 */
24162416
2417- const axios = require ( "axios" ) . default ;
24182417
24192418var TelemetrySyncManager = {
24202419
@@ -2470,15 +2469,15 @@ var TelemetrySyncManager = {
24702469 headersParam [ 'x-app-id' ] = Telemetry . config . pdata . id ;
24712470 headersParam [ 'x-device-id' ] = Telemetry . fingerPrintId ;
24722471 headersParam [ 'x-channel-id' ] = Telemetry . config . channel ;
2473- axios . post (
2474- fullPath ,
2475- JSON . stringify ( telemetryObj ) ,
2476- { headers : { headersParam} }
2477- )
2478- . then ( ( result ) => {
2479- Telemetry . config . telemetryDebugEnabled && console . log ( "Telemetry API success" , result ) ;
2480- } )
2481- . catch ( ( error ) => {
2472+ jQuery . ajax ( {
2473+ url : fullPath ,
2474+ type : "POST" ,
2475+ headers : headersParam ,
2476+ data : JSON . stringify ( telemetryObj ) ,
2477+ async : async
2478+ } ) . done ( function ( resp ) {
2479+ Telemetry . config . telemetryDebugEnabled && console . log ( "Telemetry API success" , resp ) ;
2480+ } ) . fail ( function ( error , textStatus , errorThrown ) {
24822481 if ( instance . _failedBatchSize > instance . _failedBatch . length ) {
24832482 instance . _failedBatch . push ( telemetryObj ) ;
24842483 }
Original file line number Diff line number Diff line change 11{
22 "name" : " @project-sunbird/telemetry-sdk" ,
3- "version" : " 1.2 .0" ,
3+ "version" : " 1.3 .0" ,
44 "description" : " Telemetry Service javascript library helps to generate the telemetry events." ,
55 "directories" : {
66 "example" : " example" ,
5454 "url" : " https://github.com/project-sunbird/sunbird-telemetry-sdk/issues"
5555 },
5656 "homepage" : " https://github.com/project-sunbird/sunbird-telemetry-sdk/tree/master/js#readme" ,
57- "dependencies" : {
58- "axios" : " 1.6.2"
59- },
6057 "overrides" : {
6158 "graceful-fs" : " ^4.2.11"
6259 }
Original file line number Diff line number Diff line change 11{
22 "name" : " @project-sunbird/telemetry-sdk" ,
3- "version" : " 1.2 .0" ,
3+ "version" : " 1.3 .0" ,
44 "description" : " Telemetry Service javascript library helps to generate the telemetry events." ,
55 "directories" : {
66 "example" : " example" ,
5454 "url" : " https://github.com/project-sunbird/sunbird-telemetry-sdk/issues"
5555 },
5656 "homepage" : " https://github.com/project-sunbird/sunbird-telemetry-sdk/tree/master/js#readme" ,
57- "dependencies" : {
58- "axios" : " 1.6.2"
59- },
6057 "overrides" : {
6158 "graceful-fs" : " ^4.2.11"
6259 }
You can’t perform that action at this time.
0 commit comments