Remove unnecessary JSON body from POST token request in all tutorials

This commit is contained in:
pabloFuente 2022-08-09 15:12:20 +02:00
parent ee13ba856f
commit b1ea58c412
16 changed files with 17 additions and 17 deletions

View File

@ -76,7 +76,7 @@ export class AppComponent implements OnDestroy {
// --- 4) Connect to the session with a valid user token ---
// Get a token from the OpenVidu deployment
// Get a token from the OpenVidu deployment
this.getToken().then(token => {
// First param is the token got from the OpenVidu deployment. Second param can be retrieved by every user on event
@ -178,7 +178,7 @@ export class AppComponent implements OnDestroy {
createToken(sessionId) {
return this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
).toPromise();
}

View File

@ -115,7 +115,7 @@ export class AppComponent {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -76,7 +76,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -101,7 +101,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -101,7 +101,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -79,7 +79,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -76,7 +76,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -68,7 +68,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -99,7 +99,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -71,7 +71,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -76,7 +76,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -57,7 +57,7 @@ export class AppComponent {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -117,7 +117,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -82,7 +82,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -67,7 +67,7 @@ export class AppComponent implements OnInit {
createToken(sessionId: string): Promise<string> {
return lastValueFrom(this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
));
}

View File

@ -323,7 +323,7 @@ export class AppComponent implements OnDestroy {
createToken(sessionId) {
return this.httpClient.post(
this.APPLICATION_SERVER_URL + 'api/sessions/' + sessionId + '/connections',
{ customSessionId: sessionId },
{},
{ headers: { 'Content-Type': 'application/json' }, responseType: 'text' }
).toPromise();
}