-
Notifications
You must be signed in to change notification settings - Fork 6
Description
protobuf.js version: "protobufjs": "^6.6.4",
i am new to protobufjs and planning to implement the protobufjs in Angular 2 project.
I have installed the protobufjs using the "npm install protobufjs --save" inside the Angular 2 project(VS2015).
i have the service below, which sends the request to WebAPI 2.0 service and get the response in protobuf format
getStudentNames(): Observable {
var headers = new Headers();
headers.append('Content-Type', 'application/x-protobuf');
return this.http.get('/api/students', { headers });
}
Get the sample response as below,
↵*����Ram"(�0�↵&����Gopal"
how to decode the response to below model object
//student.model.ts
export class Student
{
name:string;
rollno: number;
}
Please help me by providing some samples with descriptive steps for Get/POST/PUT/Delete request in Angular 2 and typescript.
Any help are really appreciated.