From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Examples of using jsonrpc.el to talk to http servers? Date: Thu, 26 Dec 2024 20:41:31 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28337"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 27 00:42:23 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tQxUk-0007Fc-PB for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 27 Dec 2024 00:42:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQxUC-0004ij-LC; Thu, 26 Dec 2024 18:41:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQxUA-0004iY-TO for help-gnu-emacs@gnu.org; Thu, 26 Dec 2024 18:41:46 -0500 Original-Received: from mail-yb1-xb29.google.com ([2607:f8b0:4864:20::b29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQxU9-0002sa-5k for help-gnu-emacs@gnu.org; Thu, 26 Dec 2024 18:41:46 -0500 Original-Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-e3978c00a5aso7197730276.1 for ; Thu, 26 Dec 2024 15:41:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735256502; x=1735861302; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=hlcep7Kdgb43gIajjnFjCUkEnBDeA9jSsuALo1SyoU8=; b=AKxtY/C9ZW5vhVMuJgbhSJANX//7Ypj7Df3IFrnaCJi4xEWp2UVy0jZCgDrL8RibJ2 6JWvR5C07AqT3A/dYwcIz0x1JWGldqTYG9kkR+Qt5RfM6pVSAnrpG4AUjrDSzU/aw5yY x4RHD9uHEnYyH6gEbQunR2COUwlrQOYG1ah9+4WS8AljVqg/ZuuZA786AOLrngdOJOj5 wYAgivyVQ3VeCM+iEejQgsrqP8sFQoXc8Ck8bD2BIm0aKbUpkJRBxauSDscaWpkKR0l2 tIyvhQsppBo8hlt5OS9+gFv2SjE6UP0wQKwxwEgxOnrfdxugyYkAsfDbxH/50nnUM55U 1POg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735256502; x=1735861302; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hlcep7Kdgb43gIajjnFjCUkEnBDeA9jSsuALo1SyoU8=; b=m6pibsY8M3YRGZe3lLICL0SaVYSFIlKYm4uCrOeLQ3zVhG/tRdD/csUeW6BE4prss4 6hYNa5ksC/XV5HGDhDQbh1kPTkUFgLrO6TRuXwiAK0jkhrfD2gOIvRuQT7/+hgeyhQIj 7jwuogFGnJ+Ik68reCmdXqhOkNsJMERyVDmKGZ6FqnAeqeyazT0bJqP84cfu8HtECI4j NOMV/sdnhRp+9/9zeb8TQjfih9v/gzXorvY78l3K7EszPS533gWxFOcAz1tDhx3CNigK S3F+XglItROytXPju8grQAVsflXtlXGwVmN62RTvwFvP/JLu0+Yu2DO7+Pn2dO+iND1G CUdg== X-Gm-Message-State: AOJu0Yy/dah1aQ6MnsRjbp7INlgrU7h4Lj32okFtzCt+ue4QJqvWzRLw O/+ZEzwdw26SL8yQpIxjdkD0zuGsMc1ENUHit2sKPKam+6zESXkBpceHktnDHL1Kihqfsv3ou3X kFF1OyRAgWGrGPETByR8r4n2a2YJwQ2/x X-Gm-Gg: ASbGncuvtLcu0TjtwpCbc8+W2Ti6lrxgZr4+vvABjbmrDPqwtSth2StIpe36k1OXayA yHCR2KU51wrCsxHDcP/q0vJSI6UDAIAhSLAp6g9YC X-Google-Smtp-Source: AGHT+IGItVKHzwKEypDAWiDKgnVNygPYa+EAbkXN+9XPrKhFoRkta47oKJKK5wqD+aTg/mdhYAJi1ZM13MUXEYtaZXQ= X-Received: by 2002:a05:6902:708:b0:e3c:9fb5:838d with SMTP id 3f1490d57ef6-e538c25d881mr16030007276.17.1735256502502; Thu, 26 Dec 2024 15:41:42 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::b29; envelope-from=eduardoochs@gmail.com; helo=mail-yb1-xb29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:149013 Archived-At: Hi list, I am trying to learn how to use JSONRPC, and a friend - subhuman - was helping me on IRC... we started by adapting the two snippets of code here, https://json-rpc.readthedocs.io/en/latest/quickstart.html to make a Python client talk via JSONRPC to a Python server, and everything worked... ...then we tried to write some elisp code to talk to that Python server, and my friend had to write a lot of code to make that work, because: "jsonrpc.el ... is purely TCP, it doesn't send http protocol headers, while the server we're both running expects GET blablablah and THEN your rpc post data" We got something that works, but it was a hack, and we're not very proud of it. ___QUESTION___: Where can we find examples of using the functions in jsonrpc.el to talk to HTTP clients, that expect more headers? Thanks in advance! Eduardo Ochs http://anggtwu.net/emacsconf2024.html