These are chat archives for FreeCodeCamp/Help

Mar 2019
Mar 21 00:44
hi there
is there anyone know how to find an online entry job in programming to make money
Philip Durbin
Mar 21 00:51
We hired someone through Rent A Coder once but that was maybe 12 years ago. It was renamed or aquired or something and is mentioned at
Mar 21 01:02
how do you link an external style sheet to codepen? I don't understand
Mar 21 01:33
@cmccormack yes, but the json returned by the server if error
you know like, {error: 'this error is..'}
Mar 21 01:43
@cmccormack For example, I cannot even console.log(response.json()) if server returns error.
            return fetch(url, {
                method: 'POST',
                body: formData

                if (response.ok) {
                    return response.json()
                } else {
                    throw new Error('invalid URL')
it seems like I'm trying to access a promise object?
app.js:23 Uncaught (in promise) SyntaxError: Unexpected token B in JSON at position 4
    at fetch.then.response
Christopher McCormack
Mar 21 01:51
@momozor the error is because your response is not a json object. try using response.text() instead
Mar 21 02:19
@cmccormack Promise {<resolved>: "400 Bad Request"}
I got that with console.log(response.text())
but how do I get the json?
Mar 21 05:35
can I ask a question here that is more related to coding productivity rather than actual coding
Mar 21 06:55
how do you link an external style sheet to codepen? I don't understand...<link rel="stylesheet" href="yourfile.css">
Mar 21 07:21
@kibablu Settings button ---> CSS tab ---> Add External Stylesheets/Pens
Mar 21 07:48
hello world
Mar 21 08:32
@hensn5250 Thank you
Mar 21 08:34

hello, can someone help me with request (nodejs) syntax? github api is making me use something called curl, I don't know how to fit that with my code.

const request = require("request");

const getUserData = (user) => {
  request(user, (error, response, body) => {

getUserData(""); //Request forbidden by administrative rules....

It wants me to type something like this

curl -iH 'User-Agent: '

but I don't know where to put it

dyon gerwen
Mar 21 13:34
c an someone write this in ejs6 code instead of jquery so i can understand it
        url: this.opt.sBaseURL + '/XMLHTTP/selectTab',
        data: submitData,
        dataType: 'xml',
        success: jQuery.proxy(this.handleInjectTransactions, this)
Mar 21 14:52
@fullstackinprogress_gitlab there is no exact equivalent as this would give you xml wrapped in a jquery object as a result in this.handleInjectTransactions which is not available without jquery. The equivalent with just getting xml text instead would be something like:
const queryString = '?' + Object.entries(submitData).map(([key, value]) =>`${key}=${value}`).join('&');

fetch(this.opt.sBaseUrl + '/XMLHTTP/selectTab' + queryString)
  .then(response => response.text())
  .then(result => console.log("helloooo", this));
Mar 21 15:44
function getUserData(user) {
  gitFunc(user).then((response) => {
    const data =;
    return `${data.login} ${data.url}`;
  }).catch((error) => console.log(error.message));

hello, how do I get the return data.login data.url part to show on console without using console.log inside the function?
Mar 21 16:14
@kinopotato .then(console.log)
Christopher McCormack
Mar 21 16:28
@kinopotato you can pass a callback function that you invoke from within the response
or just log it in the response