Skip to content

Instantly share code, notes, and snippets.

View pamplonafala's full-sized avatar

Matheus Pamplona pamplonafala

  • Brasil - São Paulo /SP
View GitHub Profile
@EtienneR
EtienneR / user.js
Created January 7, 2016 23:39
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
anonymous
anonymous / index.html
Created October 24, 2015 03:14
Home // source http://jsbin.com/bozuke
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="_css/estilo.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="_js/javascript.js"></script>
<script src="_js/jQuery.js"></script>
<title>Home</title>
<style id="jsbin-css">