This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request r = Request.Delete("http://url.com"); | |
//disgusting hack because Fluent doesn't accept body in DELETE requests. | |
//Manually set default headers to ensure they are at the begining | |
r.addHeader("Host", "url.com"); | |
r.addHeader("Connection", "Keep-Alive"); | |
r.addHeader("User-Agent", "Apache-HttpClient/4.5.2 (Java/1.8.0_131)"); | |
r.addHeader("Content-Length", ""+body.length()); | |
r.addHeader("Accept-Encoding", "gzip,deflate"); | |
//Add random header at the end with a valid value(else the header is not added) |