Coder Social home page Coder Social logo

Comments (3)

hoffrocket avatar hoffrocket commented on July 28, 2024

Thanks again for the bug reports. Released 1.1.3 with the fix

from scalaj-http.

arjun-v avatar arjun-v commented on July 28, 2024

Hi @hoffrocket ,

I am trying to make a PUT request with query params and body content and it seems to me the end
request doesn't retain the query params.

  1. I tried with v 1.1.3 and 1.1.4
  2. GET request works (query param is the auth token and got a valid response)
  3. CURL request works fine. Also, removing the auth token(query param i.e) results in the same response(401 unauthorized) as that obtained by Scalaj request - which led me to the conclusion that query parameter might not be passed along in scalaj request.
  4. Printing the request in the console shows the query param components though.
  5. POST request has the same issue as well

Code snippet:
Http(endpointUrl).postForm(bodyArgs.toSeq).method("PUT").params(paramMap).headers(headersSeq).option(HttpOptions.followRedirects(true))

Any pointers?

Thanks
Arjun

from scalaj-http.

arjun-v avatar arjun-v commented on July 28, 2024

The workaround I did was to serialize the map object into json string and use postData instead of postForm.

from scalaj-http.

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.