How to post a http request without cookie in headers?
See original GitHub issueHere is my pact file
{
"consumer": {
"name": "consumer"
},
"provider": {
"name": "provider"
},
"interactions": [
{
"description": "for pact",
"providerState": "test service.",
"request": {
"method": "post",
"path": "/uri",
"headers": {
"Content-Type": "application/json"
},
"body": {
"key": "value"
}
},
"response": {
"status": 200,
"body": {
"key": "value"
}
}
}
}
],
"metadata": {
"pactSpecification": {
"version": "2.0.0"
}
}
}
And get the header of post request by wireshark :
POST /uri HTTP/1.1
Cookie:
Host: 127.0.0.1:8080
Content-Length: 57
Content-Type: application/json
Due to the exist of Cookie
in header, my provider can not response correctly. How can I remove it from header?
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Using HTTP cookies - MDN Web Docs
After receiving an HTTP request, a server can send one or more Set-Cookie headers with the response. The browser usually stores the cookie...
Read more >7 Keys to the Mystery of a Missing Cookie - Medium
Check out the OPTIONS response header ACCESS-CONTROL-ALLOW-CREDENTIAL whether it is set to true . If the server doesn't allow credentials being ...
Read more >HTTP headers | Cookie - GeeksforGeeks
To check this Cookie in action go to Inspect Element -> Network check the request header for Cookie like below, Cookie is highlighted...
Read more >How do I send a request with Cookies? - ReqBin
To send an HTTP request with a Cookie, you need to add the "Cookie: name=value" header to your request. To send multiple cookies...
Read more >What are HTTP cookies - Juhana Jauhiainen
Cookies are used typically to tell if two HTTP requests come from ... server in the Set-Cookie header, to every request it will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like it sets a blank cookie for every request. Unfortunately, there’s nothing the pact library can do about that.
https://github.com/rack/rack-test/blob/v1.1.0/lib/rack/mock_session.rb#L27
Closing as a won’t fix.