Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to postURL() with Header?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
carlomagazoni
How do I cheat?
Reputation: 0

Joined: 01 Jan 2022
Posts: 3

PostPosted: Fri Jan 21, 2022 8:41 pm    Post subject: How to postURL() with Header? Reply with quote

Hello everyone! I have a question: how to add header to your postURL()? Following documentation you should just add http.Header="smt" isn't it? I have tried it with simple webhook catcher and had no result, I can't see my header in request. While using Postman I can achieve it, add any header and value to it. What I am doing wrong?
Thanks in advance.

Code:

local http = GetInternet()
local url = SomeURL
local d = "Data"
http.Header = "TestHeaderKey: TestHeaderValue"
local response=http.postURL(url,"data="..d)
print(response)
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1053
Location: 0x90

PostPosted: Sat Jan 22, 2022 4:22 am    Post subject: Reply with quote

Excuse the title, it's just this is a good explanation of HTTP headers.
https://code.tutsplus.com/tutorials/http-headers-for-dummies--net-8039
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Jan 22, 2022 4:27 pm    Post subject: Reply with quote

Looks like you can't right now. The header for postURL is set unconditionally to 'Content-Type: application/x-www-form-urlencoded'
https://github.com/cheat-engine/cheat-engine/blob/3c1e02faedfb278179f23d885accade88a520502/Cheat%20Engine/LuaInternet.pas#L208

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
carlomagazoni
How do I cheat?
Reputation: 0

Joined: 01 Jan 2022
Posts: 3

PostPosted: Sun Jan 23, 2022 12:43 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Looks like you can't right now. The header for postURL is set unconditionally to 'Content-Type: application/x-www-form-urlencoded'


Sad, but thanks for help Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites