我正在尝试调用与 OAuth 1.0 版本关联的 API。从邮递员文我尝试通过传递标头参数“Authorization”它的值如下:
OAuth realm="realm1",
oauth_consumer_key="oauth_consumer_key1",
oauth_token="oauth_token1",
oauth_signature_method="HMAC-SHA256",
oauth_timestamp="1607936624",
oauth_nonce="vWZBL6a34T",
oauth_version="1.0",
oauth_signature="0md4Tg9wqa4DZV9VGwtvwPeb0ojZoRr0j6pR00HTu1I%3D"
Run Code Online (Sandbox Code Playgroud)
由上面的键值对可知:
oauth_signature
oauth_timestamp
oauth_nonce
Run Code Online (Sandbox Code Playgroud)
这三个是动态生成的,这是我在邮递员中观察到的。如何在 C# 代码中动态生成这 3 个?
I'm newbie to angular 2. I had started working over services in angular 2. I understood that we need to decorate the class with @Injectable() to make it as a service as like below.
import {Injectable} from '@angular/core'
@Injectable()
export class MyFirstServiceClass{
SayHelloToService(){
alert('Service called');
return 'Hello, welcome your service...';
}
}
Run Code Online (Sandbox Code Playgroud)
After that we are accessing it from the constructor of our component class as like below :
import { Component } from '@angular/core';
import {MyFirstServiceClass} from './FirstService.service'
@Component({ …Run Code Online (Sandbox Code Playgroud)