Skip to content

Instantly share code, notes, and snippets.

View AnDyro751's full-sized avatar
🗽
Working from home

Ángel Méndez AnDyro751

🗽
Working from home
View GitHub Profile
require "net/http"
require "json"
require "uri"
# Cliente HTTP genérico, reutilizable para cualquier API REST
class HttpClient
class RequestError < StandardError; end
def initialize(open_timeout: 5, read_timeout: 10, logger: nil)
@open_timeout = open_timeout
require "test_helper"
require "json"
require Rails.root.join("lib/easy_broker_client").to_s
class EasyBrokerClientTest < Minitest::Test
BASE_URL = EasyBrokerClient::API_BASE_URL
def test_fetch_all_properties_combines_pages_and_yields_payloads
responses = [
{ page: 1, next_page: 2, public_ids: %w[EB-1] },
@AnDyro751
AnDyro751 / index.html
Created September 3, 2018 01:33
FIXED
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<meta charset="utf-8">
<script src="main.js"></script>
<title></title>
<link href="main.css" rel="stylesheet" type="text/css">
<link href="font.css" rel="stylesheet" type="text/css">
var path = require("path");
var express = require("express");
var webpack = require("webpack");
const morgan = require('morgan');
var sockjs = require('sockjs');
var http = require('http');
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
var sockjs_echo = sockjs.createServer(sockjs_opts);