
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@covalent/http
Advanced tools
Deprecation Notice - This component will be deprecated in favor of a different implementation View Doc
It is a framework of decorators on top of the angular [HttpClient] or covalent [TdHttpService] to enhance your services and give them Http capabilities.
Example:
import { Injectable } from '@angular/core';
import { HttpHeaders, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import {
mixinHttp,
TdGET,
TdPOST,
TdBody,
TdParam,
TdResponse,
TdQueryParams,
} from '@covalent/http';
/**
* mixinHttp can use TdHttpService and HttpClient
*/
@Injectable()
export class TestHttpService extends mixinHttp(class {}, {
baseUrl: 'www.mybaseurl.com',
baseHeaders: new HttpHeaders({ 'Accept': 'application/json' }),
}) { // or }, HttpClient) {
/**
* Generates http request [www.mybaseurl.com/myitems] GET and returns an HttpResponse object
*/
@TdGET({
path: '/myitems',
options: {
observe: 'response',
},
})
getResponse(): Observable<HttpResponse<any>> { return; }
/**
* Assuming queryParams = {q: 1}
* Generates http request [www.mybaseurl.com/myitems?q=1] GET and returns the response body parsed in JSON
*/
@TdGET({
path: '/myitems',
})
getParsedResponse(@TdQueryParams() queryParams?: HttpParams): Observable<HttpResponse<any>> { return; }
/**
* Generates http request [www.mybaseurl.com/myitems] GET and returns the number of items after we use `map` of the response body
*/
@TdGET({
path: '/myitems',
})
getMappedResponse(@TdResponse() response?: Observable<HttpResponse<any>>): Observable<number> {
return response.pipe(
map((data: any) => {
return data.items.length;
}),
);
}
/**
* Assuming `id` = 1234
* Generates http request [www.mybaseurl.com/myitems/1234] GET and returns the response body parsed in JSON
*/
@TdGET({
path: '/myitems/:id',
})
get(@TdParam('id') id: string,
@TdResponse() response?: Observable<HttpResponse<any>>): Observable<any> { return; }
/**
* Generates http request [www.mybaseurl.com/myitems] POST with a request body and returns the response body parsed in JSON
*/
@POST({
path: '/myitems',
})
create(@TdBody() body: any,
@TdResponse() response?: Observable<HttpResponse<any>>): Observable<any> {
return response.pipe(
map((data: any) => {
return {
name: data.MyName,
};
}),
);
}
}
FAQs
Teradata UI Platform HttpClient Helper Module
The npm package @covalent/http receives a total of 174 weekly downloads. As such, @covalent/http popularity was classified as not popular.
We found that @covalent/http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.