Giter Site home page Giter Site logo

Comments (5)

Jacse avatar Jacse commented on June 9, 2024

+1 would really like to have cookie-support as well

from cordova-http.

Jacse avatar Jacse commented on June 9, 2024

Nevermind, the plugin was already capable of doing what I needed. @Logmytech is set the Cookie-header like so:

cordovaHTTP.setHeader("Cookie", "cookie1=cookie_value1 ; another_cookie=cookie_value2"), function() {
    console.log('session cookie success!');
}, function() {
     console.log('session cookie error :(');
});

from cordova-http.

ehaab avatar ehaab commented on June 9, 2024

@Jacse if we want to make post request with headers ,should we add your line of code before post request or we can add the headers inside post request?

from cordova-http.

Jacse avatar Jacse commented on June 9, 2024

@ehaab before the request if I remmenes correctly. Also no callbacks needed

from cordova-http.

ehaab avatar ehaab commented on June 9, 2024

@Jacse could you tell how to construct the post request if i want to send these values to api ? I don't know which ones should be as header and which ones as data !

POST http://xxxxxxxxxxxxxxx/api/itemURL/1234 HTTP/1.1
API_KEY: XXXXXXXXXXXXXXXXXXXXXXXX
UserID: XXXXXXXXXXXXXXXXXXXXXXXXX
User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.2.2; Galaxy Nexus Build/JDQ39)
Host: XXXXXXXXXXXXXXXXXXXXX
Cookie: __cfduid=2342435465423eafrsdfdfaesdfasdqwr41234
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

from cordova-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.