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
| 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 |
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
| 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] }, |
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
| asasasa |
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> | |
| <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"> |
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
| asasasa |
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
| 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); |