Remove unnecessary JSON body from POST token request in all tutorials
This commit is contained in:
parent
ee13ba856f
commit
b1ea58c412
@ -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();
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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' }
|
||||
));
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user