question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--content-types-to-compress format for list[str]

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az cdn endpoint create

Errors:

Refuse str type as a valid iter type.
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
    six.reraise(*sys.exc_info())
...
python3.8/site-packages/msrest/serialization.py, ln 754, in serialize_data
    return self.serialize_type[iter_type](
python3.8/site-packages/msrest/serialization.py, ln 831, in serialize_iter
    raise SerializationError("Refuse str type as a valid iter type.")
msrest.exceptions.SerializationError: Refuse str type as a valid iter type.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az cdn endpoint create -g {} --tags {} --name {} --origin {} --profile-name {} --enable-compression {} --no-http {} --no-https {} --origin-host-header {} --content-types-to-compress {}

Expected Behavior

Environment Summary

macOS-10.15.5-x86_64-i386-64bit
Python 3.8.3
Installer: HOMEBREW

azure-cli 2.7.0

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yungezzcommented, Jun 11, 2020

routing to appropriate team

0reactions
mgressmancommented, Jun 24, 2021

@t-bzhan , did you actually run this command?

When I run the command I get the error ‘UnrecognizedArgumentError: unrecognized arguments: text\html’.

So far, I have found no syntax that will allow me to use the --content-types-to-compress switch and no documentation to give direction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common MIME types - HTTP - MDN Web Docs
Extension Kind of document MIME Type .aac AAC audio audio/aac .abw AbiWord document application/x‑abiword .arc Archive document (multiple files embedded) application/x‑freearc
Read more >
Which JSON content type do I use? - Stack Overflow
The MIME media type for JSON text is application/json . The default encoding is UTF-8. For JSONP (runnable JavaScript) with callback: application/javascript.
Read more >
Reducing JSON Data Size - Baeldung
In this tutorial, we'll look at various ways of reducing the size of JSON in our Java applications.
Read more >
Compress-Archive - PowerShell - Microsoft Learn
The Compress-Archive cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, ......
Read more >
Serving compressed files - Amazon CloudFront
You can use CloudFront to automatically compress certain types of objects ... CloudFront can compress objects using the Gzip and Brotli compression formats....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found