GithubHelp home page GithubHelp logo

content-length about vba-web HOT 3 CLOSED

vba-tools avatar vba-tools commented on August 28, 2024
content-length

from vba-web.

Comments (3)

timhall avatar timhall commented on August 28, 2024

@HeSe Excel-REST isn't set up to automatically add the content-length parameter, but I'll add the functionality soon. In the meantime, use AddHeader to add the Content-Length to the request. Example:

Dim Body As String
Body = "..."

Request.AddBodyString Body
Request.AddHeader "Content-Length", Len(Body)

from vba-web.

HeSe avatar HeSe commented on August 28, 2024

Hi Tim,

thanks for the reply. I had tried this, but it didn't work either.

I realized that I had fogotten to set the httpGET to the intended httpPOST method. Now it works,... but I stil lwonder now, if it should still possible to put a body into a httpGET call... it is not the way it should be in REST, but it still should be possible...

Sebastian

from vba-web.

timhall avatar timhall commented on August 28, 2024

Excel-REST will add the Body to all requests (including GET) if it is set explicitly using Request.AddBody or Request.AddBodyString.

The only case where the Body is not added is for Request.AddParameter for GET requests since those are added as query string parameters. (This behavior was based on my experience with RestSharp)

from vba-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.