sergio

sergio

This isn’t really an Elixir question, moreso a general Postman question.

I’m using Postman to HTTP GET this URL:

https://redsky.target.com/redsky_aggregations/v1/web/plp_search_v2?key=9f36aeafbe60771e321a7cc95a78140772ab3e96&category=0snqs&channel=WEB&count=24&default_purchasability_filter=true&faceted_value=55e6uZakkosZ5tdv0Z55dgnZnqueqc6d44fZ54jftZ4bmrplmkj9nZpyq1lZwlkrxZkpg5pZ4bmrpllkdobZ56ds9Zfmt6gZ4bmrpli4j3qZ57yv4Z55kh9Z4bmrplqkc0lZpu2iyZftml9&include_sponsored=true&new_search=false&offset=48&page=%2Fc%2F0snqs&platform=desktop&pricing_store_id=746&scheduled_delivery_store_id=746&sort_by=newest&store_ids=746%2C1075%2C3424%2C2843%2C2848&useragent=Mozilla%2F5.0+(Windows+NT+10.0%3B+Win64%3B+x64)+AppleWebKit%2F537.36+(KHTML%2C+like+Gecko)+Chrome%2F119.0.0.0+Safari%2F537.36&visitor_id=018C306A752F02019455A6119EB0FB86&zip=33196

The request works and it returns the JSON I’m expecting. When I use the “copy as curl” feature, the request works in my Terminal.

curl --location ‘https://redsky.target.com/redsky_aggregations/v1/web/plp_search_v2?key=9f36aeafbe60771e321a7cc95a78140772ab3e96&category=0snqs&channel=WEB&count=24&default_purchasability_filter=true&faceted_value=55e6uZakkosZ5tdv0Z55dgnZnqueqc6d44fZ54jftZ4bmrplmkj9nZpyq1lZwlkrxZkpg5pZ4bmrpllkdobZ56ds9Zfmt6gZ4bmrpli4j3qZ57yv4Z55kh9Z4bmrplqkc0lZpu2iyZftml9&include_sponsored=true&new_search=false&offset=48&page=%2Fc%2F0snqs&platform=desktop&pricing_store_id=746&scheduled_delivery_store_id=746&sort_by=newest&store_ids=746%2C1075%2C3424%2C2843%2C2848&useragent=Mozilla%2F5.0%2B(Windows%2BNT%2B10.0%3B%2BWin64%3B%2Bx64)%2BAppleWebKit%2F537.36%2B(KHTML%2C%2Blike%2BGecko)%2BChrome%2F119.0.0.0%2BSafari%2F537.36&visitor_id=018C306A752F02019455A6119EB0FB86&zip=33196’
–header ‘Cookie: mitata=ZDY4NmU2NDA3NjFlNGE2YjQ0YjAxY2NkMzY1OTU3MmRiNDFiOTAyY2UzOTRmMmQ3NTBlZDZlNDE3M2IxZTY2ZA== /@#/1701625898_/@#/cttujxbBJYtyKSbd_/@#/NGZhODVhZmNjY2UyZmJhOWE3MTk1MzQ0NWI5NmQwNDk4YTBhZTY2MWI0YjI1ZjQ5YzFhNmEwMjVhOWZmYzNlOA==_/@#/000’

After a few minutes the CURL request breaks, and I have to use Postman to make the GET request again because I noticed that the Cookie value is being changed automatically by Postman.

My question is how is Postman automatically refreshing this cookie value and how can I do this myself in Elixir code?

Is it doing some kind of preflight hit to the URL?

Showing Posts 1 to 3

sergio

sergio OP

Progress!

By doing curl -c mycookies.txt yada yada I’m able to save the cookie value and then use it to make the original request work.

Now to automate this…

D4no0

D4no0

Have you checked the Set-Cookie header in the response? This is the mechanism used to store cookies in the browser.

sergio

sergio OP

Turns out Req does this automatically for me, so I was worrying ahead of time over this for nothing. :laughing:

Thanks @wojtekmach !

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews