Isaaaak
Isaaaak
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
Any1 got any idea?
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
the problem is the headers I think
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
because I'm pretty sure the JSON is not the problem
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
if we disregard this
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
anyways
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
but then I have to deal with tasks and stuff :(
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
I do think I have that, I'm not really familiar with the concept however. I just removed this serialization for debugging purposes and put the actual JSON instead
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
No description
23 replies
CC#
Created by Isaaaak on 2/1/2024 in #help
API request, working in Postman but not C#
there are no credentials/no auth it's not required)
23 replies
CC#
Created by Isaaaak on 1/22/2024 in #help
Opening vite with another browser
Ah solved it, was some setting in a config file way outside of the solution, weird
3 replies
CC#
Created by Isaaaak on 1/22/2024 in #help
Opening vite with another browser
import { fileURLToPath, URL } from 'node:url';

import { defineConfig } from 'vite';
import plugin from '@vitejs/plugin-react';
import fs from 'fs';
import path from 'path';
import child_process from 'child_process';

process.env.BROWSER = "chrome"; // added this line
const baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ''
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : "reactapp3.client";

if (!certificateName) {
console.error('Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.')
process.exit(-1);
}

const certFilePath = path.join(baseFolder, `${certificateName}.pem`);
const keyFilePath = path.join(baseFolder, `${certificateName}.key`);

if (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath)) {
if (0 !== child_process.spawnSync('dotnet', [
'dev-certs',
'https',
'--export-path',
certFilePath,
'--format',
'Pem',
'--no-password',
], { stdio: 'inherit', }).status) {
throw new Error("Could not create certificate.");
}
}

// https://vitejs.dev/config/
export default defineConfig({
plugins: [plugin()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
proxy: {
'^/weatherforecast': {
target: 'https://localhost:7260/',
secure: false
}
},
port: 5173,
https: {
key: fs.readFileSync(keyFilePath),
cert: fs.readFileSync(certFilePath),
},
open: process.env.BROWSER // and added this line
},
})
import { fileURLToPath, URL } from 'node:url';

import { defineConfig } from 'vite';
import plugin from '@vitejs/plugin-react';
import fs from 'fs';
import path from 'path';
import child_process from 'child_process';

process.env.BROWSER = "chrome"; // added this line
const baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ''
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : "reactapp3.client";

if (!certificateName) {
console.error('Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.')
process.exit(-1);
}

const certFilePath = path.join(baseFolder, `${certificateName}.pem`);
const keyFilePath = path.join(baseFolder, `${certificateName}.key`);

if (!fs.existsSync(certFilePath) || !fs.existsSync(keyFilePath)) {
if (0 !== child_process.spawnSync('dotnet', [
'dev-certs',
'https',
'--export-path',
certFilePath,
'--format',
'Pem',
'--no-password',
], { stdio: 'inherit', }).status) {
throw new Error("Could not create certificate.");
}
}

// https://vitejs.dev/config/
export default defineConfig({
plugins: [plugin()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
proxy: {
'^/weatherforecast': {
target: 'https://localhost:7260/',
secure: false
}
},
port: 5173,
https: {
key: fs.readFileSync(keyFilePath),
cert: fs.readFileSync(certFilePath),
},
open: process.env.BROWSER // and added this line
},
})
3 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
thanks you so much, didn't realize it was that "simple" (really very hard, for me)
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
string message = "{\"subscribe\":[\"ETH-USD\", \"BTC-USD\", \"YM=F\", \"ES=F\", \"QM=F\", \"RTY=F\", \"MNQ=F\", \"NQ=F\"]}";
string message = "{\"subscribe\":[\"ETH-USD\", \"BTC-USD\", \"YM=F\", \"ES=F\", \"QM=F\", \"RTY=F\", \"MNQ=F\", \"NQ=F\"]}";
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
You can change it to something else if you want, like "ES=F"
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
ye it's an index, so it's right
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
true, seems weird
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
think it's supposed to be that way
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
wooah
54 replies
CC#
Created by Isaaaak on 1/16/2024 in #help
Protocol buffer from Yahoo Finance API
thanks, gonna try that
54 replies