Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-string values in header object #338

Open
daMatz opened this issue Apr 11, 2024 · 0 comments
Open

Support non-string values in header object #338

daMatz opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
triage This ticket will be looked at shortly

Comments

@daMatz
Copy link

daMatz commented Apr 11, 2024

Description

Non-string values should be supported in the header object.

This:

import initCycleTLS from 'cycletls';

(async () => {
  const cycleTLS = await initCycleTLS();

  const headers = {
    'Accept': '*/*',
    'myCoolInt': 1,
    'lat': 53.00939388,
	'booleansRock': true
  };

  const response = await cycleTLS('https://example.com', {
    body: 'test',
    ja3: '...',
    userAgent: '...',
    'headers': headers,
  }, 'get');

  console.log(response);

  cycleTLS.exit();
})();

Leads to:

Error Processing Request (please open an issue https://github.com/Danny-Dasilva/CycleTLS/issues/new/choose) -> 2024/04/11 09:18:55 Unmarshal Errorjson: cannot unmarshal number into Go struct field Options.options.headers of type string

Issue Type

Bug

Operating System

Windows 10

Node Version

None

Golang Version

None

Relevant Log Output

No response

@daMatz daMatz added the triage This ticket will be looked at shortly label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This ticket will be looked at shortly
Projects
None yet
Development

No branches or pull requests

2 participants