首页 > 系统相关 >curl bat shell 杂七杂八

curl bat shell 杂七杂八

时间:2024-08-18 10:37:21浏览次数:11  
标签:bat shell http json api REM curl localhost

curlRequest\json\createtodo.json


{
  "name": "eat",
  "status": 0,
  "remark": "eat apple"
}

curlRequest\json\createtodo2.json


{
  "name": "eat",
  "status": 0,
  "remark": "eat orange"
}

curlRequest\json\dddlogin.json






curlRequest\json\login.json



curlRequest\json\loginldap.json




curlRequest\json\post.json


{
  "title": "书籍标题",
  "body": "bar",
  "userId": 1
}

curlRequest\json\post2.json


{
  "name": "wash face",
  "status": 0,
  "remark": "before out"
}

curlRequest\json\updatetodo.json


{
  "name": "eat",
  "status": 0,
  "remark": "eat 30 apple"
}

curlRequest\ddd_req.sh

curlRequest\req_b2b.bat


@REM 通过zfdhd 获取order

@REM curl -s "http://localhost:5121/api/Orders/zfhtzdh/GCFH0000000000000592" 



@REM 通过order id获取order process
@REM curl -s "http://localhost:5121/api/Processes/orderid/2" 








curlRequest\req_ddd.bat



@REM -----------------------------------------------------------------------------------------------------------


@REM curl "http://localhost:5294/api/Auths/login" ^
@REM   -H "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
@REM   -H "Connection: keep-alive" ^
@REM   -H "Content-Type: application/json-patch+json" ^
@REM   -H ^"Cookie: authorized-token=^{^%^22accessToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.admin^%^22^%^2C^%^22expires^%^22:1919520000000^%^2C^%^22refreshToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.adminRefresh^%^22^}; multiple-tabs=true; .AspNetCore.Antiforgery.s4870XLI5gU=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbWiNeFXrOQ3p46CBdIPwXxhO5mWgxcRkIJiLn28rVCgNYTqlWHKPDGhkppyXI9a2zJmIT40_tNOnUrDdnAFug48IfZfpeSIp7onWOItGu2AO90pK34CAhXjPEdXJd20VE^" ^
@REM   -H "Origin: http://localhost:5294" ^
@REM   -H "Referer: http://localhost:5294/swagger/index.html" ^
@REM   -H "Sec-Fetch-Dest: empty" ^
@REM   -H "Sec-Fetch-Mode: cors" ^
@REM   -H "Sec-Fetch-Site: same-origin" ^
@REM   -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" ^
@REM   -H "accept: */*" ^
@REM   -H ^"sec-ch-ua: ^\^"Not/A)Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"126^\^", ^\^"Microsoft Edge^\^";v=^\^"126^\^"^" ^
@REM   -H "sec-ch-ua-mobile: ?0" ^
@REM   -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
@REM   --data-raw ^"^{^
@REM   ^\^"userName^\^": ^\^"admin^\^",^
@REM   ^\^"password^\^": ^\^"Abc123^@^\^"^
@REM ^}^"


@REM -----------------------------------------------------------------------------------------------------------
@REM post请求,读取外本json,普通登录
@REM curl -X POST http://localhost:5121/api/Auths/login -H "Content-Type: application/json" -d @login.json





@REM -----------------------------------------------------------------------------------------------------------
@REM ldap登录
@REM curl -X POST https://localhost:7244/api/Auths/login/ldap -H "Content-Type: application/json" -d @loginldap.json




@REM -----------------------------------------------------------------------------------------------------------
@REM post请求,读取外本json,普通登录
@REM curl -s -X POST https://localhost:7244/api/Auths/login -H "Content-Type: application/json" -d @login.json





@REM -----------------------------------------------------------------------------------------------------------
@REM curl "http://localhost:5121/api/Accounts" ^
@REM   -H "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
@REM   -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiY2ltYWRtaW4iLCJleHAiOjE3MjM5NzExODQsImlzcyI6Ikxvbmdmb3JjZSIsImF1ZCI6IkdpZ2FEZXZpY2UifQ.oUT3gZVo92drwXQZOFs1eaVqdCRwlN4BJHJ9qsppod0" ^
@REM   -H "Connection: keep-alive" ^
@REM   -H ^"Cookie: authorized-token=^{^%^22accessToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.admin^%^22^%^2C^%^22expires^%^22:1919520000000^%^2C^%^22refreshToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.adminRefresh^%^22^}; multiple-tabs=true; .AspNetCore.Antiforgery.s4870XLI5gU=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbWiNeFXrOQ3p46CBdIPwXxhO5mWgxcRkIJiLn28rVCgNYTqlWHKPDGhkppyXI9a2zJmIT40_tNOnUrDdnAFug48IfZfpeSIp7onWOItGu2AO90pK34CAhXjPEdXJd20VE; .AspNetCore.Identity.Application=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbEzeah-u9d3G8CION5NonTDX5tSZ2wPUO0oDGhdCiKC2SH4WooB4h8ZX4jdEcQ00YvjAYS342dBAtJ3i_IAqKQYb2B2I9t3VrziWAcCc3w-C8546aW3dLwQavAFD3wDmw5klnOdlYrkSr8AIfSowkvpM-SdpAZfkx3NTcsmok1up4CTIflUUNRmsGyPrAbMotd4rb_7IJy0KOp8R32OOeIS8jNS-r3N4QheJrNPLn4kjD_BsN5bEJAm3NpHqU3qE6mXVWx_MNt8HJMyQo6n9hNJe4p6HE38N4oyoykz9nSXQcG6CVXhF3Xqo6wwlhq99IDTlT0Q_ecFnexBgCyWQk7sCiqVNEO1B3I1rABr9gcB5pPxn_95DQHT6r6-huo6ir4_D6YrjBPACecIg-dbHRAH7XgR15nP32hP5BXDtOG3JtmZocDeQbK_vH0DQe_KVgSSKdIALS-cwlPUzvYXS4iZQyoVsqwftjx_CWXBt45txIELAfZpdduX6P1DYTN-2Vf5MJ6CYhgb9vheIcQwn5Zlmz8KahUm2h3M8SiS7FLZMfdQ-l7dTwDuJvz8oO0f2OSHmnGm1MU8o3mBwsNW6K4iv6ED4keJs--YZ8bq-Kj6g^" ^
@REM   -H "Referer: http://localhost:5121/swagger/index.html" ^
@REM   -H "Sec-Fetch-Dest: empty" ^
@REM   -H "Sec-Fetch-Mode: cors" ^
@REM   -H "Sec-Fetch-Site: same-origin" ^
@REM   -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" ^
@REM   -H "accept: */*" ^
@REM   -H ^"sec-ch-ua: ^\^"Not/A)Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"126^\^", ^\^"Microsoft Edge^\^";v=^\^"126^\^"^" ^
@REM   -H "sec-ch-ua-mobile: ?0" ^
@REM   -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^"



@REM -----------------------------------------------------------------------------------------------------------
@REM curl -s -X GET http://localhost:5121/api/Accounts  ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiY2ltYWRtaW4iLCJleHAiOjE3MjM5NzExODQsImlzcyI6Ikxvbmdmb3JjZSIsImF1ZCI6IkdpZ2FEZXZpY2UifQ.oUT3gZVo92drwXQZOFs1eaVqdCRwlN4BJHJ9qsppod0"



curl -s -X GET http://localhost:5121/api/Accounts  ^
    -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiWjA1NzM1IiwiZXhwIjoxNzIzOTcxOTgxLCJpc3MiOiJMb25nZm9yY2UiLCJhdWQiOiJHaWdhRGV2aWNlIn0.bh03h4c3ovGJbFV1d3LXF0uInQmMKTTOCZXF8_98HKA"




curlRequest\req_ddd01.bat



@REM -----------------------------------------------------------------------------------------------------------


@REM curl "http://localhost:5294/api/Auths/login" ^
@REM   -H "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
@REM   -H "Connection: keep-alive" ^
@REM   -H "Content-Type: application/json-patch+json" ^
@REM   -H ^"Cookie: authorized-token=^{^%^22accessToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.admin^%^22^%^2C^%^22expires^%^22:1919520000000^%^2C^%^22refreshToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.adminRefresh^%^22^}; multiple-tabs=true; .AspNetCore.Antiforgery.s4870XLI5gU=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbWiNeFXrOQ3p46CBdIPwXxhO5mWgxcRkIJiLn28rVCgNYTqlWHKPDGhkppyXI9a2zJmIT40_tNOnUrDdnAFug48IfZfpeSIp7onWOItGu2AO90pK34CAhXjPEdXJd20VE^" ^
@REM   -H "Origin: http://localhost:5294" ^
@REM   -H "Referer: http://localhost:5294/swagger/index.html" ^
@REM   -H "Sec-Fetch-Dest: empty" ^
@REM   -H "Sec-Fetch-Mode: cors" ^
@REM   -H "Sec-Fetch-Site: same-origin" ^
@REM   -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" ^
@REM   -H "accept: */*" ^
@REM   -H ^"sec-ch-ua: ^\^"Not/A)Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"126^\^", ^\^"Microsoft Edge^\^";v=^\^"126^\^"^" ^
@REM   -H "sec-ch-ua-mobile: ?0" ^
@REM   -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
@REM   --data-raw ^"^{^
@REM   ^\^"userName^\^": ^\^"admin^\^",^
@REM   ^\^"password^\^": ^\^"Abc123^@^\^"^
@REM ^}^"


@REM -----------------------------------------------------------------------------------------------------------
@REM post请求,读取外本json,普通登录
@REM curl -X POST http://localhost:5121/api/Auths/login -H "Content-Type: application/json" -d @login.json





@REM -----------------------------------------------------------------------------------------------------------
@REM ldap登录
@REM curl -X POST https://localhost:7244/api/Auths/login/ldap -H "Content-Type: application/json" -d @loginldap.json




@REM -----------------------------------------------------------------------------------------------------------
@REM post请求,读取外本json,普通登录
@REM curl -s -X POST https://localhost:7244/api/Auths/login -H "Content-Type: application/json" -d @dddlogin.json





@REM -----------------------------------------------------------------------------------------------------------
@REM curl "http://localhost:5121/api/Accounts" ^
@REM   -H "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
@REM   -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiY2ltYWRtaW4iLCJleHAiOjE3MjM5NzExODQsImlzcyI6Ikxvbmdmb3JjZSIsImF1ZCI6IkdpZ2FEZXZpY2UifQ.oUT3gZVo92drwXQZOFs1eaVqdCRwlN4BJHJ9qsppod0" ^
@REM   -H "Connection: keep-alive" ^
@REM   -H ^"Cookie: authorized-token=^{^%^22accessToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.admin^%^22^%^2C^%^22expires^%^22:1919520000000^%^2C^%^22refreshToken^%^22:^%^22eyJhbGciOiJIUzUxMiJ9.adminRefresh^%^22^}; multiple-tabs=true; .AspNetCore.Antiforgery.s4870XLI5gU=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbWiNeFXrOQ3p46CBdIPwXxhO5mWgxcRkIJiLn28rVCgNYTqlWHKPDGhkppyXI9a2zJmIT40_tNOnUrDdnAFug48IfZfpeSIp7onWOItGu2AO90pK34CAhXjPEdXJd20VE; .AspNetCore.Identity.Application=CfDJ8Axlvo0Ayg1JuTT9Rad2NjbEzeah-u9d3G8CION5NonTDX5tSZ2wPUO0oDGhdCiKC2SH4WooB4h8ZX4jdEcQ00YvjAYS342dBAtJ3i_IAqKQYb2B2I9t3VrziWAcCc3w-C8546aW3dLwQavAFD3wDmw5klnOdlYrkSr8AIfSowkvpM-SdpAZfkx3NTcsmok1up4CTIflUUNRmsGyPrAbMotd4rb_7IJy0KOp8R32OOeIS8jNS-r3N4QheJrNPLn4kjD_BsN5bEJAm3NpHqU3qE6mXVWx_MNt8HJMyQo6n9hNJe4p6HE38N4oyoykz9nSXQcG6CVXhF3Xqo6wwlhq99IDTlT0Q_ecFnexBgCyWQk7sCiqVNEO1B3I1rABr9gcB5pPxn_95DQHT6r6-huo6ir4_D6YrjBPACecIg-dbHRAH7XgR15nP32hP5BXDtOG3JtmZocDeQbK_vH0DQe_KVgSSKdIALS-cwlPUzvYXS4iZQyoVsqwftjx_CWXBt45txIELAfZpdduX6P1DYTN-2Vf5MJ6CYhgb9vheIcQwn5Zlmz8KahUm2h3M8SiS7FLZMfdQ-l7dTwDuJvz8oO0f2OSHmnGm1MU8o3mBwsNW6K4iv6ED4keJs--YZ8bq-Kj6g^" ^
@REM   -H "Referer: http://localhost:5121/swagger/index.html" ^
@REM   -H "Sec-Fetch-Dest: empty" ^
@REM   -H "Sec-Fetch-Mode: cors" ^
@REM   -H "Sec-Fetch-Site: same-origin" ^
@REM   -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" ^
@REM   -H "accept: */*" ^
@REM   -H ^"sec-ch-ua: ^\^"Not/A)Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"126^\^", ^\^"Microsoft Edge^\^";v=^\^"126^\^"^" ^
@REM   -H "sec-ch-ua-mobile: ?0" ^
@REM   -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^"



@REM -----------------------------------------------------------------------------------------------------------
@REM curl -s -X GET http://localhost:5121/api/Accounts  ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiY2ltYWRtaW4iLCJleHAiOjE3MjM5NzExODQsImlzcyI6Ikxvbmdmb3JjZSIsImF1ZCI6IkdpZ2FEZXZpY2UifQ.oUT3gZVo92drwXQZOFs1eaVqdCRwlN4BJHJ9qsppod0"



@REM curl -s -X GET http://localhost:5121/api/Accounts  ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiWjA1NzM1IiwiZXhwIjoxNzIzOTcxOTgxLCJpc3MiOiJMb25nZm9yY2UiLCJhdWQiOiJHaWdhRGV2aWNlIn0.bh03h4c3ovGJbFV1d3LXF0uInQmMKTTOCZXF8_98HKA"



@REM -----------------------------------------------------------------------------------------------------------
@REM post请求,读取外本json,普通登录
@REM curl  -X POST http://localhost:5294/api/Auths/login -H "Content-Type: application/json" -d @dddlogin.json










@REM --------------------------------
@REM 获取个人信息
@REM curl -s -X GET http://localhost:5294/api/Accounts  ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJhM2Q3NTQ4Mi1jYmQ2LTRkYTMtOTk1Zi1jZGE4YmI4YTI5ZDkiLCJleHAiOjE3MjM4MTA3ODgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.8KGrsXKOakZ7QSqpeeRqcs-qXkfLDcfafsd0ao5g6Eo"





@REM --------------------------------
@REM curl -X POST http://localhost:5294/api/Todos   ^
@REM   -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  ^
@REM   -H "Content-Type: application/json-patch+json"  ^
@REM   -d @createtodo2.json




@REM curl -X GET http://localhost:5294/api/Users?UserName=admin ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  


@REM curl -X GET http://localhost:5294/api/Todos?PrePage=10 ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  



@REM 4dd26f18-d750-4846-ba3b-c8b43a25d10e
@REM curl -X GET http://localhost:5294/api/Todos/e3dcc7ab-47d4-4b9a-49a9-08dcbe9384d6 ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  






@REM 
@REM curl -X GET http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036 ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  


@REM curl -X GET http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036 ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  



@REM curl -X PUT http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036 ^
@REM     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  
@REM     -d @updatetodo.json

















@REM curl -X 'PUT' \
@REM   'http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036' \
@REM   -H 'accept: */*' \
@REM   -H 'Content-Type: application/json-patch+json' \
@REM   -d '{
@REM   "name": "eat",
@REM   "status": 0,
@REM   "remark": "eat 10 apple"
@REM }
@REM '



@REM curl -X PUT http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036 ^
@REM   -H "Content-Type: application/json-patch+json" ^
@REM   -d @updatetodo.json




curl -X GET http://localhost:5294/api/Todos/67493325-6e99-4d06-fd9f-08dcbe7e2036 ^
    -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiI0ZGQyNmYxOC1kNzUwLTQ4NDYtYmEzYi1jOGI0M2EyNWQxMGUiLCJleHAiOjE3MjM5NTkxNzgsImlzcyI6IkVsZXRyaWNBUEkiLCJhdWQiOiJFbGV0cmljQVBJIn0.SOx8HqbEsV73DWz-4L__BZ4hmMY20YQ7sUEpO9KI-i8"  







  

curlRequest\req_lean.bat


@REM  get 请求
@REM curl -s https://jsonplaceholder.typicode.com/posts/1 




@REM  post 请求
curl -s -d '@post.json' https://jsonplaceholder.typicode.com/posts



curl "https://www.cnblogs.com/zhuoss/ajax/PostComment/Add.aspx" ^
  -H "accept: application/json, text/javascript, */*; q=0.01" ^
  -H "accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6" ^
  -H "content-type: application/json; charset=UTF-8" ^
  -H ^"cookie: _ga=GA1.1.920207567.1717286811; _ga_M95P3TTWJZ=deleted; _ga_M95P3TTWJZ=deleted; _clck=1slxzl8^%^7C2^%^7Cfmx^%^7C0^%^7C1625; _ga_3Q0DVSGN10=GS1.1.1720009122.3.1.1720009128.54.0.0; HMACCOUNT=B2EC4F03AFDAAF8D; .AspNetCore.Antiforgery.b8-pDmTq1XM=CfDJ8ONv0caE5GtEh3YJ5j088kn41EEeQP_wuad4pG2kpJi4KlTSt495rBLhqKlUN3i3HxgrEY7lPZCfSZ1f29mzfJ1KHe0rb-Plx3aLfbxv5eVboGaHYS1GxGc2kuf8S3rnf9bPPDdsUvIo0gpl7SMVz7Q; __utma=226521935.920207567.1717286811.1721137299.1721137299.1; __utmc=226521935; __utmz=226521935.1721137299.1.1.utmcsr=zzk.cnblogs.com^|utmccn=(referral)^|utmcmd=referral^|utmcct=/; _ga_XPE8C2TMTE=GS1.1.1721137536.1.1.1721137586.0.0.0; Hm_lvt_866c9be12d4a814454792b1fd0fed295=1722855798; _ga_C2LFP3RFGH=GS1.1.1723040311.25.1.1723040315.0.0.0; .Cnblogs.AspNetCore.Cookies=CfDJ8ONv0caE5GtEh3YJ5j088kkyj_PpE5VLWAzATXGiSwvEsSyj7G9UjaDzrKoAf8F-qEWp6QVcIOSb4ltz4m6cgEeG-TXJyafqh8Fk8C_4hdeKt0eJcMcINSKd1oqx8ToSsknYwrrJMw0CKDP9gU2wYBfPplVLL7KPXH-uQhhOcz2IsnLbU6TQ_DGdwiidVyK5ARwPfxsyRbdfLRoBa95Zr3TFxKXJfeMt526dY9eXGzdWZ57ZDxeXUmatQp63A9DUX631SnCjvoZ1jVsh1Vv944oeEPbXOQGVzC2LpbjK2_WceQKISLB-W4P5_fWuhuHSLgpg9Nn3c9swb-k6PHYSn45xqeX0TyAHdlFSktpOcGmikguNxTO8EM_zEYTVKI5NYaxl9qHa7V6YKNPI_dje2QnJbIaukPKTTwv0Pge3h0j7eK6nQRVGINLJDBv59lEj-25SZukCY78SmjZDhhr0h-gVBsIS2Qj5ZnyRghTOcB7_ZCA9ZAKHvLBvHSTitykOv04_g6ZKPATEoAicgeSif0d1OQfgcN6cQha-cOmHqKz9nLM7PblpGa7rH5qfmzXlyx2mgtCNDuB8FXEbb8czXEo; _ga_L4KFJNGL7P=GS1.1.1723295219.5.1.1723295844.0.0.0; _ga_M95P3TTWJZ=GS1.1.1723474560.74.1.1723474563.0.0.0; Hm_lpvt_866c9be12d4a814454792b1fd0fed295=1723474564^" ^
  -H "origin: https://www.cnblogs.com" ^
  -H "priority: u=1, i" ^
  -H "referer: https://www.cnblogs.com/zhuoss/p/18353191" ^
  -H "requestverificationtoken: CfDJ8ONv0caE5GtEh3YJ5j088km5eV16fClwmCdb8l7b6y14Ygk8qZ3VxNRkSHXxBuiYFX2SBn1pkwDXfr_p20OBUTZJDH7OD6nMuwhyAKhWRXdpFyI49627niAqgy4bNbvra4tUbM58GnGAQJYL4xodz5V08tpNxe32X3biniyjDfbQnoauUNF3o321EC5nWvSA0Q" ^
  -H ^"sec-ch-ua: ^\^"Not/A)Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"126^\^", ^\^"Microsoft Edge^\^";v=^\^"126^\^"^" ^
  -H "sec-ch-ua-mobile: ?0" ^
  -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
  -H "sec-fetch-dest: empty" ^
  -H "sec-fetch-mode: cors" ^
  -H "sec-fetch-site: same-origin" ^
  -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" ^
  -H "x-requested-with: XMLHttpRequest" ^
  --data-raw ^"^{^\^"postId^\^":18353191,^\^"body^\^":^\^"test^\^",^\^"parentCommentId^\^":0^}^"


curl -X POST http://localhost:8080/api -H "Content-Type: application/json" -d @sendfile.json












curlRequest\run.bat


@echo off
setlocal enabledelayedexpansion
chcp 65001


rem 设置一个变量用于存储最新的文件名和修改时间
set newestFile=
set newestTime=0

rem 遍历当前目录下所有以temp开头的文件
for /f "delims=" %%i in ('dir /b /a-d req*.bat') do (
    set "currentFile=%%~fi"
    set "currentTime=%%~ti"
    rem 提取时间中的小时、分钟和秒
    for /f "tokens=1-3 delims=:." %%j in ("%currentTime%") do (
        set /a currentHour=%%j, currentMinute=%%k, currentSecond=%%l
    )
    rem 将时间转换为可比较的数字格式
    set /a currentTime=!currentHour! * 3600 + !currentMinute! * 60 + !currentSecond!
    
    rem 如果当前文件的时间比已知的最新文件的时间新,则更新最新文件信息
    if !currentTime! gtr !newestTime! (
        set newestFile=%%~fi
        set newestTime=!currentTime!
    )
)

set file_path=!newestFile! 
for %%F in ("%file_path%") do set "file_name=%%~nF"

set out_file_path=%file_name%_out.md 

for /f "tokens=2 delims==" %%a in ('wmic os get localdatetime /value') do set "dt=%%a"
set "formatted_time=%dt:~0,4%%dt:~4,2%%dt:~6,2%_%dt:~8,2%%dt:~10,2%%dt:~12,2%"
echo.  >> %out_file_path%
echo.  >> %out_file_path%
echo # %formatted_time%_%file_name% >> %out_file_path%
echo.  >> %out_file_path%
echo ```json  >> %out_file_path%
call %file_path% >> %out_file_path%
echo.  >> %out_file_path%
echo ```  >> %out_file_path%

code %out_file_path%




curlRequest\run_sh.sh

curlRequest\zz.bat


set "scriptPath=%cd%" 
D: && cd D:\dotnet.-script\App\bin\Debug\net8.0\ && D:\dotnet.-script\App\bin\Debug\net8.0\App.exe  "%scriptPath%"   "Question"


  












标签:bat,shell,http,json,api,REM,curl,localhost
From: https://www.cnblogs.com/zhuoss/p/18365354

相关文章

  • curl 命令行 crud http shell get post put delete restful
    GETcurl-X'GET'\'http://localhost:5294/api/Todos?Status=0&PrePage=10'\-H'accept:*/*'POSTcurl-X'POST'\'http://localhost:5294/api/Todos'\-H'Authorization:BearereyJhb......
  • bat 检查某个补丁是否安装成功 ,并将结果输出到日志1.log,支持多个补丁,每次运行log文件
    以下是一个可以检查多个补丁是否安装成功,并将结果输出到 1.log 文件(每次运行重新生成)的BAT脚本示例:bat@echooffrem清空日志文件del1.logrem定义要检查的补丁列表setpatches=KB123456KB789101KB234567rem遍历补丁列表进行检查并输出结果到日志for%%pin......
  • powershell命令 域管理: 加入域:将计算机加入指定的 Active Directory 域。 重新加入域
    PowerShell命令示例:域管理加入域:powershellCopyCodeAdd-Computer-DomainName"yourdomain.com"-Credential"yourdomain\username"-Restart重新加入域:powershellCopyCodeRemove-Computer-UnjoinDomainCredential"yourdomain\username"......
  • netdom 和 PowerShell 的 Add-Computer 命令可以将计算机加入特定的组织单位(OU)。如果
    netdom和PowerShell的Add-Computer命令可以将计算机加入特定的组织单位(OU)。使用 netdom:netdom是一个用于管理Windows域的命令行工具。要将计算机加入到特定的OU,使用以下命令:bashCopyCodenetdomjoin<ComputerName>/domain:<DomainName>/ou:<OUPath>/userd:<Use......
  • asp.net 禁止主机交互式 shell 命令执行权限风险 ashx
    以下为ai回复:在ASP.NET应用程序中,如果要防止通过ashx文件执行宿主环境的shell命令以避免潜在的权限提升风险,可以通过设置web.config来限制或禁用此功能。在web.config中,可以通过设置<securityPolicy>来禁止执行shell命令。以下是一个示例配置,它禁用了所有的shell执行权限:<syst......
  • 基于flask+vue框架的基于mybatis的医用器械管理系统[开题+论文+程序]-计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着医疗技术的飞速发展,医用器械在医疗机构中的重要性日益凸显。然而,传统的手工或简单信息系统管理方式已难以满足现代医院对器械管理的高......
  • Unixed |As IBM's legal battle over Linux intensifies, other firms hope to benefi
    BPC>Fullarticletextfetchedfrom(noneedtoreportissueforexternalsite): | archive.today | archive.mdBusiness |IBMandLinuxUnixedAsIBM'slegalbattleoverLinuxintensifies,otherfirmshopetobenefitJun19th2003 | san......
  • Linux c程序中获取shell脚本输出(如获取system命令输出)
    在工作中遇到一个小问题,就是想获取函数system()执行之后打印的字符串信息。这个功能还是很实用的,能为我们节省很多开发时间,特地整理了一下相关知识点分享给大家。1.使用临时文件1.1使用shell的重定向首先想到的方法就是将命令输出重定向到一个临时文件,在我们的应用程序中读......
  • shell脚本实战应用
    一、脚本1、实际问题:本地主机不定时收到安全日志并储存到/data/miguanfile中,另一台安全设备由于功能限制,每次均会读取本地主机的/data/miguanfile的全部文件,而不是读取最新的文件,导致读取告警日志重复解决方案1:写一个脚本:如果该目录内有文件,则移动该目录下所有文件到另......
  • Mybatis里PageHelper的分页
    com.github.pagehelper.Page#Page(int,int,boolean,java.lang.Boolean)130pageNum==1&&pageSize==Integer.MAX_VALUE设置则不分页,设置pageSize=0并且pageSizeZero=true继续看拦截器请求注意如果是平时,pageSize<=0是不会去分页,pageSize=0回去count,com.github.pa......