This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host) { | |
url = url.toLowerCase(); | |
host = host.toLowerCase(); | |
if (isPlainHostName(host)) { | |
return "DIRECT"; | |
} | |
if ((host == "hml.mol.mapfre.com.br") || | |
(host == "ftp.mapfre.com.br") || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<server> | |
<id>docker.io</id> | |
<username>{docker_id}</username> | |
<password>{senha_docker_hub}</password> | |
<configuration> | |
<email>{email}</email> | |
</configuration> | |
</server> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.2.0.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
margin-top: 30px; | |
} | |
.add-car { | |
margin-bottom: 30px; | |
} | |
.list-car { | |
margin-bottom: 50px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav aria-label="breadcrumb"> | |
<ol class="breadcrumb"> | |
<li class="breadcrumb-item active" aria-current="page">Gerenciamento de carros</li> | |
</ol> | |
</nav> | |
<div class="container"> | |
<div class="card list-car"> | |
<h5 class="card-header">Lista de carros</h5> | |
<div class="card-body"> | |
<table class="table"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>AngularHttp</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { CarService } from './services/car.service'; | |
import { Car } from './models/car'; | |
import { NgForm } from '@angular/forms'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.httpClient.get<Car[]>(this.url) | |
this.httpClient.post<Car>(this.url, JSON.stringify(car), this.httpOptions) | |
this.httpClient.put<Car>(this.url + '/' + car.id, JSON.stringify(car), this.httpOptions) | |
this.httpClient.delete<Car>(this.url + '/' + car.id, this.httpOptions) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; | |
import { Observable, throwError } from 'rxjs'; | |
import { retry, catchError } from 'rxjs/operators'; | |
import { Car } from '../models/car'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class CarService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Car { | |
id: number; | |
model: string; | |
color: string; | |
price: number; | |
} |
NewerOlder