Question: we are facing an issue in production that the 'Content-Length' header is not being sent, even if we hard-code it in the headers properties, so we are receiving back from the server the 411 Length Required error.

We are using:

* Axios 0.16.2
* NodeJS 6.10
* Application deployed inside AWS Lambda environment

The code that is causing the issue is the following:

```
let cookieJar;
const postBody = "MyBody=MyBodyContentGoesHere";
const url = "https://my-url.com";
return axios
        .post(url,
            postBody,
            {
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded'
                },
                timeout: 10000,
                jar: cookieJar,
                withCredentials: true
            }
        );

```

I wrote an application in .NET and the header is sent properly (without to pass it manually). This .NET application was written just to test, it's not the real application.

Do you have some idea?
I open a issue in the axios github project, but I want to know from you guys some ideas.

Thank you.

Answer: 
You can specify the .py file form which you wish to import in the code itself by adding a statement `sc.addPyFile(Path)`.   
The path passed can be either a local file, a file in HDFS (or other Hadoop-supported filesystems), or an HTTP, HTTPS or FTP URI.  

Then use `from add_num import add_two_nos`
You need to include a zip containing add\_num.py in your spark-submit command.

```
./bin/spark-submit --py-files sources.zip /Users/workflow/test_task.py 

```

When submitting a python application to spark, all the source files imported by the main function/file(here test\_task.py) should be packed in a egg or zip format and supplied to spark using --py-files option. If the main function needs only one other file, you can supply it directly without zipping it.

```
./bin/spark-submit --py-files add_num.py /Users/workflow/test_task.py

```

Above command should also work since there is only one other python source file required.