apache - Java HttpClient Add Header and Credentials To Get Auth Cookie Back -
i've been trying week response server. requires username, password, , custom header authorization code. have far , have verified many times information log in server correct. when use information on google postman true response along cookie need when in java false , no cookie. i'm confused... i'm sending message correctly?
httpclient httpclient = new defaulthttpclient(); httpclient.getparams().setparameter("username", user); httpclient.getparams().setparameter("password", pass); httppost httppost = new httppost(loginurl); httppost.addheader(authname, stageapi); httpresponse httpresponse = httpclient.execute(httppost);
Comments
Post a Comment