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

Reply via email to