On Sun, 2016-10-09 at 17:19 -0400, Arya F wrote: > I am working with a rest server that the cookies are returned in the > response body and not the response headers, which makes it impossible for > HttpClient to automatically deal with the cookies. > > I have extracted the cookies into POJO classes and they look like this > > "T" : > "z=a3S.XBahmAYBSVvVHamKFS2NDA3MwY1TjUwNDROMDFPMDROMU&a=QAE&sk=DAAB0fOdrGnTGN&ks=EAAHQk2lLIRRoBAqtAEvrDGHQ--~E&kt=EAAcDL4YtVi4VAabIF_d2mUEA--~F&d=c2wBTXpjd05BRXlPVEkzTXpNNU56WTROek01Tmprek1nLS0BYQFRQUUBZwFWR0JEUDdEUkoyVzRPT0w3UVJWSjRBNFpTUQFzY2lkAWtIM3VJdzNTdUpIYVZsWlF5ZGc4QjhjcXBfRS0BYWMBQUZiOVZpYU5sWldLZ1pvLQF0aXABanBfVnhDAXNjAXltb2JpbGVtYWlsAWZzAXVjZ2JwV0ZYLlMzYQF6egFhM1MuWEJnZEM-; > path=/; domain=.MYDOAMIN.com; HttpOnly", > > > My question is > > Do I need to break the value of the cookie as well manually? like > separating the value, domain and path before giving it to HttpClient? Or > does HttpClient have a method which I can pass the full value below and > HttpClient would automatically extract the domain, path and value? > > > z=a3S.XBahmAYBSVvVHamKFS2NDA3MwY1TjUwNDROMDFPMDROMU&a=QAE&sk=DAAB0fOdrGnTGN&ks=EAAHQk2lLIRRoBAqtAEvrDGHQ--~E&kt=EAAcDL4YtVi4VAabIF_d2mUEA--~F&d=c2wBTXpjd05BRXlPVEkzTXpNNU56WTROek01Tmprek1nLS0BYQFRQUUBZwFWR0JEUDdEUkoyVzRPT0w3UVJWSjRBNFpTUQFzY2lkAWtIM3VJdzNTdUpIYVZsWlF5ZGc4QjhjcXBfRS0BYWMBQUZiOVZpYU5sWldLZ1pvLQF0aXABanBfVnhDAXNjAXltb2JpbGVtYWlsAWZzAXVjZ2JwV0ZYLlMzYQF6egFhM1MuWEJnZEM-; > path=/; domain=.MYDOAMIN.com; HttpOnly
http://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/cookie/RFC2965Spec.html#parse(org.apache.http.Header,%20org.apache.http.cookie.CookieOrigin) Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org