http-post

Convert CURL command line to VBA

岁酱吖の 提交于 2020-05-09 17:13:41
问题 In CURL, I can use this line curl --data 'DataToBeSent' https://example.com/resource.cgi I am struggling to convert such line to be used in VBA and this is my try till now Sub POST_Method_Example() Dim myMessage As String myMessage = "DataToBeSent" With CreateObject("MSXML2.ServerXMLHTTP") .Open "POST", "https://example.com/resource.cgi" .setRequestHeader "Content-Type", "multipart/form-data; boundary==------------------------d74496d66958873e" .send sData(myMessage) Debug.Print .ResponseText

Convert CURL command line to VBA

笑着哭i 提交于 2020-05-09 17:11:53
问题 In CURL, I can use this line curl --data 'DataToBeSent' https://example.com/resource.cgi I am struggling to convert such line to be used in VBA and this is my try till now Sub POST_Method_Example() Dim myMessage As String myMessage = "DataToBeSent" With CreateObject("MSXML2.ServerXMLHTTP") .Open "POST", "https://example.com/resource.cgi" .setRequestHeader "Content-Type", "multipart/form-data; boundary==------------------------d74496d66958873e" .send sData(myMessage) Debug.Print .ResponseText

Upload file to file.io using POST method

萝らか妹 提交于 2020-05-08 16:37:28
问题 I have found a link at SO that may make difference at this query Upload a Picture to file.io (HTTP Post) in VBA The code from this link Sub UploadFilesUsingVBAORIGINAL() 'this proc will upload below files to https://file.io/ ' png, jpg, txt Dim fileFullPath As String fileFullPath = ThisWorkbook.Path & "\Sample.txt" POST_multipart_form_dataO fileFullPath End Sub Private Function GetGUID() As String ' Generate uuid version 4 using VBA GetGUID = WorksheetFunction.Concat(WorksheetFunction.Dec2Hex

how to send large data using post method in nodejs?

一世执手 提交于 2020-04-22 06:35:47
问题 I am trying to process large csv data in nodejs at server side, but as node is single threaded cpu uses goes to 100%. I could not find any solution so that it does not consume much time. So I have decided to process the data on client side and then send it to server and then save it into database. The data might be about 20 to 30 MB. Is it possible or if possible is it good practice to send this much data over http. I checked this question but could not find it helpful. 回答1: To know the limit

how to send large data using post method in nodejs?

你说的曾经没有我的故事 提交于 2020-04-22 06:33:14
问题 I am trying to process large csv data in nodejs at server side, but as node is single threaded cpu uses goes to 100%. I could not find any solution so that it does not consume much time. So I have decided to process the data on client side and then send it to server and then save it into database. The data might be about 20 to 30 MB. Is it possible or if possible is it good practice to send this much data over http. I checked this question but could not find it helpful. 回答1: To know the limit

Can't scrape names from next pages using requests

你离开我真会死。 提交于 2020-03-03 11:48:52
问题 I'm trying to parse names traversing multiple pages from a webpage using a python script. With my current attempt I can get the names from it's landing page. However, I can't find any idea to fetch the names from next pages as well using requests and BeautifulSoup. website link My attempt so far: import requests from bs4 import BeautifulSoup url = "https://proximity.niceic.com/mainform.aspx?PostCode=YO95" with requests.Session() as s: r = s.get(url) soup = BeautifulSoup(r.text,"lxml") for

Can't scrape names from next pages using requests

☆樱花仙子☆ 提交于 2020-03-03 11:48:20
问题 I'm trying to parse names traversing multiple pages from a webpage using a python script. With my current attempt I can get the names from it's landing page. However, I can't find any idea to fetch the names from next pages as well using requests and BeautifulSoup. website link My attempt so far: import requests from bs4 import BeautifulSoup url = "https://proximity.niceic.com/mainform.aspx?PostCode=YO95" with requests.Session() as s: r = s.get(url) soup = BeautifulSoup(r.text,"lxml") for

How do I upload a zip file via HTTP post using VBA?

百般思念 提交于 2020-02-22 06:33:05
问题 This question has been asked many times by others in some form or another but most remained unanswered or the given answer is "Use C#, duh!", which incidentally, is a non-answer. ;-) I want to upload a zip file to a web server via VBA. The server side code already exists and works well; it accepts zip files via manual form upload and does something with the contents of the zip file. The theory is, I plan to transform the binary contents of the zip file into a HTTP request string and send it

How to handle ajax/http-post request (responsetype: arraybuffer) using nodejs+express in the backend

假如想象 提交于 2020-02-15 22:52:15
问题 Situation : Client js sends ajax request to nodejs express server. Client xmlHttpRequest=new XMLHttpRequest(); xmlHttpRequest.open("POST","/some/server/path,true); xmlHttpRequest.responseType="arraybuffer"; xmlHttpRequest.send(new Uint8Array(arraybufferobject)); Server(so far) var express = require('express'); var server = express(); server.use(express.static(__dirname)); server.use(express.bodyParser()); server.post('/goforms/modbus/',function(req,res,next){ //How to access the uint8array ||

Upload a Picture to file.io (HTTP Post) in VBA

纵饮孤独 提交于 2020-01-31 05:42:05
问题 I am trying to upload a file with https://file.io with VBA in Excel, using their Api (https://www.file.io/#one, see below). I've found this thread how to upload file to file.io and get link, however, I didn't know how to accurately transfer it from C# to VBA. The syntax on File.io is: $ curl -F "file=@test.txt" https://file.io {"success":true,"key":"2ojE41","link":"https://file.io/2ojE41","expiry":"14 days"} $ curl https://file.io/2ojE41 This is a test $ curl https://file.io/2ojE41 {"success"